Well, they have to, in order to stay relevant among non-ms-stack developers.
Macs have been compatible enough since release of OS X.
Yes and no. I flip between OSX, Windows 11 and Debian 11. The WSL2 and wayland stuff in Windows 11 is impressive, but after a while it feels like an OK linux distribution with a terrible window manager. OSX feels ancient, i have a VM with solaris 2.6 from 1995 in it and frankly OSX just isnt that much different.
Both make me appreciate debian more and more.
To be fair there are still similarities between the siblings that make many tools you use behave in the same way. But also true that Apple is generally in favor of lock-in.