Is it? Hardware engineers at Apple, Microsoft, Meta, NVIDIA, Amazon are paid much better than at Intel.
I'd bet that if you averaged out compensation from the top 100 paying companies for both hardware and software engineering rather than the top 5, the software number would be nearly double the hardware number. Once you start look at "normal" companies, the difference in margins between software and hardware and its effect on pay becomes very clear.
And arguably most of these companies (minus Apple and nvidia) have software and services as their bread and butter, not hardware.