> Windows has to run across the most heterogenous set of hardware and configurations of any of the major OSes.
Fair, but let's not forget a couple of facts.
First of all, most of the early Linux woes stemmed from two main roots. Drivers, and bad implementations of standards (ACPI & APIC most prominently). Lower cost Windows machines always needed "vendor drivers" to workaround what sins vendors committed with bottom of the barrel hardware, so these drivers handled the non-standard things they did with the already crippled hardware.
Let's also not forget that Microsoft tried their best to weaponize standards to break Linux (in a similar fashion they broke Dr. DOS). See: Halloween Documents [0].
So given your hardware implements the standards correctly, and you have drivers for your hardware, Linux works way better on the same hardware than Windows. This brings us to
> It supports the $200 junkbox your gran bought from Walmart to $20,000 enterprise racks and is expected to support all of those different workloads and insane variety of software that can be installed.
I have two Intel N100 boxes. One is running W11, the other one is running Debian Testing w/KDE. Former is my parents', latter is mine. Mine is using less RAM, running way cooler, and uses less CPU cycles to accomplish harder tasks, while supporting all the hardware on it, at full speed. So, given your hardware implements the standards, and you have drivers, there's no difference in support. It's not a design/kernel issue. It's a support/willingness issue.
I just remembered that Valve's Source Engine ran 25% faster on Linux after porting without any post-port optimizations, which is a great example how Linux is generally lighter and how well it can perform if given proper drivers for any piece of hardware.
> In contrast, I'd make the case that the majority of Linux distros are running in large data centers like AWS, Azure, and GCP where there's a relatively high degree of homogeneity of the underlying hardware and the operating environment on top of that.
I'm an HPC admin managing clusters close to two decades. The problems you encounter on these systems when something goes wrong is way complex than you see on desktop systems. All of these resiliency features create tons of complexity while helping you. Linux runs on these systems better for a longer time, because these systems are implementing standards correctly for a longer time, and you pay for expensive hardware and correct implementation of it, so kernel bundled drivers work correctly 99.9% of the time when you change the hardware.
> macOS, for example, operates a comparatively limited set of hardware platforms.
XNU is for all intents and purposes is BSD kernel, and macOS can be considered a BSD. Give proper drivers, macOS can also run on from your spoon to a satellite. It's POSIX compliant. They even contribute back to BSDs.
[0]: https://www.catb.org/~esr/halloween/