A lot of people learned to code from completely free materials on the internet. In fact, it's actually amazing how much free learning resources there are on the internet. That's how we create a good internet ecosystem, not by making everyone pay for every little thing.
Teaching AI how to code is a continuation of building this ecosystem because people will use these generative AI coding tools, lowering the bar to code.