It's excessively expensive though. It's a business expense for me, but otherwise I would've bought one of those laptops that come with Linux pre-installed.
Most likes Linux laptops are in the same pricing ballpark as a MacBook Air or MacBook Pro. And they don't have macOS.
So, setting aside the price and performance, compare the machines setting those aside. Most other machines feel clunky by comparison. I bought an XPS 15 and had audio driver issues. The fans blow out of the bottom, which seems pretty lame for having a laptop, say, on your lap. It has a lame plastic flexy feel compared to a MacBook. A lot of people mention the XPS line as an alternative to the Macs, but I bought one to leave the Mac ecosystem, and it felt so clunky that I still just went ahead and bought another Mac after that.
So, I really think it makes perfect sense if the price and performance don't much concern you.
Why are MBs and MBPs used in the tech industry? Many types of dev roles can only be done well on Linux or OSX (or BSD), because they're writing software for servers or their software runs on servers. The company has to choose. Some companies go exclusively Linux for their desktops and OSX for their laptops. Some go exclusively laptop. Linux does have mature enough laptops for consumers, but for business use on the laptop side Linux hasn't gone far enough. I have yet to run into a company that doesn't offer laptops because of remote and partial remote work being so common, along with needing to take your work computer into meeting rooms from time to time.
In short, it depends on the industry you're in, and if you're not in those industries you probably haven't seen it, but what fuels most Macbook sales is businesses.
RAM and docker were very important for our product and whoever chose the MacBook ended up regretting it (devs only, I mean).
For me, the MacBooks still have the best build quality, trackpad, speakers, display resolution (instead of the FHD vs overkill 4K choice) and, more importantly, I just prefer macOS and its approach on laptops. Furthermore, you can still sell a used macbook after years for quite high prices compared to the Windows alternatives. Granted, I'd never buy some of Apple's products/configurations (like an iMac, the Mac Pro or the 16 MBP with 64 GB of RAM), but a base MBP with 16GB of RAM is more than adequate for me nowadays and it's not much more expensive than the alternatives.
If you don't care about the OS (or prefer Windows/linux), then obviously a macbook doesn't make any sense these days
I bought Macs way back in the day - my last one was a 2006 Mac Mini to use as an HTPC. But every time I get ready to buy a computer, Macs don’t seem to have any advantage. I would be installing the same software I use for Windows - Chrome, Visual Studio Code and various language runtimes, Visual Studio (or Rider), a bit torrent client, Plex, etc.
I can buy a Dell a lot cheaper - of course from the MS store to avoid all of the crapware - and have more options.
I still recommend Macs for other people though who have the budget. They are still slightly less of a hassle than Windows and they can go to an Apple Store if they have any issues.
A while ago I installed a pristine Windows 10 (retail) copy on my NUC, just to see where Windows is at. I'll skip the Candy Crash Saga criticism. But I was really surprised that besides the drivers, it also auto-installed some crappy RealTek application and some crappy Intel application (for tweaking GPU settings or whatever). No vendor driver CDs or whatnot. Just letting Windows idle for some time and these applications were installed.
Is it really possible to get a pristine Windows install these days?
On the other hand, even if Kubuntu (my preference) run perfectly on a Macbook, I'd still go for a Thinkpad, because of the keyboard and the touchpad.