The attraction of programmers to macOS née OS X has always been its UNIX foundations. Programmers love UNIX. Programmers made UNIX for programmers. Unfortunately, from the epoch until very recently, UNIX has had GUIs ranging in quality from absolute shit to mediocre. That's finally changing with Free Desktop (Wayland + GNOME/KDE, and support libraries). OS X gave programmers a UNIX core with a beautiful user interfac…
I disagree with the fact that the UI experience of macOS vs Linux is a joy vs pretty good.
That's only true if you compare macOS vs GNOME/KDE. But that's a false dichotomy. IMHO, Linux truly shines on minimal setups without a desktop environment. Of course this is not suitable for everyone. But if you are a programmer, there are good chances that it is suitable for you.
I would never ever switch back from an environment with StumpWM, Emacs, Firefox and xterm to macOS. And that still doesn't factor in the biggest advantage of Linux, openness and a first-class package manager.
Now, you could even take things further and ask for a purely functional package manager and OS. That would be NixOS. Such a setup has many advantages over traditional UNIX userlands worth investigating.
If you are considering macOS, you should at least also consider this kind of Linux setup. All that said, macOS is terrific and a great option for many developer usecases.