In reality, programming is a highly skilled profession that requires considerable investment in time and hard work to get good at it. If you make that investment and gain those skills, you can use them to generate a lot of value, and that's why it pays relatively well as an industry.
I'll go further than that. It takes a certain kind of thinking that not everyone can do well, regardless of time and effort that they are willing to put in. (Of course, those people may also be less willing to put the time and effort in, because they can tell that it's not a good fit for them.)
Anyone can slap down some code and get something to marginally work from a tutorial they read online.
The skill (and subsequent value) comes in when priorities change, things need to be refactored, and you need an experienced developer to come up with a solution that works well.
Despite the fact that there are plenty of free tools to learn the technical skill, not many people want or have the time to invest into learning it. There is a pretty high demand for programmers but the supply is comparatively low. This leads to high salaries.
In reality, programming is a highly skilled profession that requires considerable investment in time and hard work to get good at it. If you make that investment and gain those skills, you can use them to generate a lot of value, and that's why it pays relatively well as an industry.
Everyone can be physically fit, for free, yet not many achieve and or maintain it.
The skill (and subsequent value) comes in when priorities change, things need to be refactored, and you need an experienced developer to come up with a solution that works well.