1. There's a HUGE difference in skill sets between software engineers. Some of us have deep understandings of algorithms, linear algebra, and CS theory, and others know how to style a button with appropriate margins. I'll leave it as an exercise to the reader to decide which of these is more difficult.
2. Inequity exists everywhere, and neurotic self-guilt doesn't really accomplish anything. The bottom line is we're all brought into this world with differing advantages/disadvantages across both nature and nurture.
Rather than bemoaning the inherent nature of a free market on a random news board, you'd be better off searching for methods of active altruism, donating to auditable charities (Charity Navigator and GiveWell come to mind), and actively helping those in need.
No, I don’t think knowing how to perform an affine transform justifies a 20x better salary than the common man has access to. The vast majority of folks in tech are not building rocket ships and flying cities.
I have the former, but 95% of the value I bring to FAANG is the latter.
My job lately is to double the revenue of various products that were built by a thousand deep algorithm workers but got no attention in the attention economy, by identifying and improving which button color (eg) would direct the traffic. My simple work gets all the money directed to the company, but was far easier than the hard work of making The Thing. Because algorithm nerds often have no idea what is appealing or valuable to human customers.
Software is everywhere. It manages life and safety critical things for millions (billions?) of people every day. So much of everything that goes on at every level is affected by software. Software is also unique in that one engineer's work output can be sold, at near zero cost, to a billion people in theory. That isn't actually true but you get the idea.
Software Engineer is just a new professional class. Its value proposition is high and it turns out a relatively small number of people have the mental model and aptitude to be really good at it.