This is the kind of thinking that prevents labor from organizing and having no power.
You always look at the person being paid less than you or working in "relatively" worse conditions and think oh at least I'm not doing that job. All amenities that these companies "treat their workers" with are not out of goodness of there hearts but they are all designed to keep the worker in the office longer and work longer hours. The cost of those amenities are a fraction of profits these workers make for the company.
You have seen how little it takes these companies to layoff employees. "Our profits dipped 5% this year? well too bad you gotta go even if you worked 20 years for this company".
Also don't be under any illusion that the golden era of a high paid dev job is going to last forever. As the supply for skilled tech increases and the automation evolves, the average tech workers are going to be as expendable as any other profession, they already are in fact. In fact the sole reasons these companies promote "teach your kids to code" is not because they care about our kids development, but it's because they want a steady supply of tech workers in future at low cost. The more tech workers there are, the less they have to pay.
In the end, the fact that these companies are making ungodly amounts of profits should be seen as a huge red alert. This is nothing but exploitation of labor no matter which field you are working on. Exploitation doesn't have to be working in poor conditions. If a worker is getting paid only a fraction of value they are producing then it qualifies as exploitation and should be looked with scrutiny.