People with degrees, especially in stem are small (in compare to all ppl) group of people who are willing to put multi year, intense effort studying non trivial things
So yea, just those traits make them more likely to earn more
Go ahead and give degree to somebody without skills in good paying jobs and see whether that person will be milions ahead too
A degree gets you in the door at all and starts you off with a higher salary (I would say significantly so) than someone with no comparable education. Those two things are a huge advantage, both in terms of money and in terms of the odds that you will be able to start making it at all.
Degree is not worth this much.