If you said any other career except programming I'd agree with this, but programming is literally the least gate-kept of the high-paying careers. Anyone can break into programming, all you need is the internet, interest and aptitude to understand code.
In my country at least, having friends or family with a foot in the door is pretty essential to landing that first interview. You still need to demonstrate competence, though.
I think the newness of software engineering relative to more traditional professions like medicine, law, and even other kinds of engineering is a large part of the reason why gatekeeping is less of a barrier. Given enough time, though, I'm sure this will change for the worse.
It is the least gate-kept, but it's still gate-kept. The higher-paying SWE jobs all want a college degree and have an blatant preference for new college grads. You can get such a job without a degree, but it's much harder than getting into college in the first place.
I do think it’s hard to break into initially — if you are approaching it from any other industry (such as what I did), it can take a few jobs to make the leap into a high paying career.
Edit: not trying to derail what you had said either, just a comment
> Anyone can break into programming, all you need is the internet, interest and aptitude to understand code.
If by "break into programming" you mean getting any decent paying job, it's even easier than that. I'd say it's closer to "show up on time having showered and be able to code yourself out of a paper bag".
If you said any other career except programming I'd agree with this, but programming is literally the least gate-kept of the high-paying careers. Anyone can break into programming, all you need is the internet, interest and aptitude to understand code.