I get that you meant is probably that MacOS is close enough to Linux that you can somehow pretend it is the same when developing things which are ultimately going to run on Linux.
To which I say, I personally think that buying Apple is wasting a lot of money for something which would work fine in a VM but well, that’s nice aluminium I guess.