Why is there no difference between 2 differently capitalized folders? I have an empty directory called "foo". I try to create a new directory called "Foo". But I cannot create it:

***@###:~/test$ mkdir foo
***@###:~/test$ ls
foo
***@###:~/test$ mkdir Foo
mkdir: Foo: File exists
***@###:~/test$ ls
foo


The same behaviour can be seen for files as well.

On Linux, 2 files/folders with a difference in case can coexist in the same directory.

Why did MacOS chose to not allow case differentiation for files and directories?
History. Backwards compatibility. Customer preference.

Historical Apple, and other, filesystems were not always case-sensitive. HFS+ and now APFS have such capability. That is, they can be case sensitive or insensitive, depending on how it was formatted.

If you are using macOS to manipulate file and folders on a case-insensitive file system macOS will prevent creating same-named files even though their displayed names can include both cases.

Experiment by plugging in flash drives formatted in different filesystems (FAT, ext3, etc) to easily test this behavior.