If almost everyone can learn programming for free, why is the salary relatively very high?
I can actually give you perfect analogy for it.
Consider the below image.
Now even if you have not studied civil engineering still you will be able to build it right? Almost anyone with basic knowledge and thinking can build this small little structure?
Now have a look at below image.
Now to build something like above takes a lot of knowledge experience.
So even if you can learn programming all by yourself but being good at it is really hard.
You get paid as a programmer just because of the skill you have doesn’t really matter how you acquired it.