In my (likely very controversial to HN) opinion, software devs are already heavily compensated compared to other professions and adding more benefits on top of that in the form of WFH just make it even more unfair. What is fair? It is what the employers are willing to pay and if most are demanding RTO then that is just what the market is willing to bear.
Most jobs do not have the luxury of WFH. Not for a doctor, a biologist, a chemist, a civil engineer, a lawyer, etc. They are required to come to office to work and they are often paid less than a software dev.