Your mental model of the world is not the mental model everyone has of the world. Your quoted sentence above comes from the result on one thinking their way of the world is the only way. This is surprisingly common in a number of intelligent people. The result of this is that it prevents them from creating products.
One person might pay because the course provides a structured way to learn a topiC. Another person might pay because by paying, they are more likely to learn the subject.
Support is one thing.
Let's say you have a $100 course where you build something real in the end. Not only do you get fully working code (which could easily save you 100+ hours of dev time) but you also get direct access to the author to ask questions. At least that's what I do in my own courses (I offer (24/7 - sleeping hours) support).
Sure the fully working code that gets continuous updates is nice on its own but think how expensive it would be if you wanted to hire someone to do 1 on 1 help with you as you learn something new from various blog posts and scattered Youtube videos. You could easily spend $100-200 an hour for that and it would be less effective because the person you're paying likely didn't write the material you're learning from.
For a lot of folks $100 is well worth saving an endless amount of nights of furiously Googling around on how to troubleshoot things. Especially if they have a family or are trying to ship whatever they want to build as soon as possible.
With enough persistence you might be able to battle through that on your own, especially if it's a well explored technology that's been around for a long time but we all have limited time. If you value spending 50 hours of your own time instead of spending $100 then you're right, you're probably not the target audience for buying courses.
If I see a course on SQL, sure I could get all that content for free, but I am more likely to commit if I paid something for it, and I know that, and I'll convince myself it's a good investment because it's curated etc even if I ultimately end up using a lot of free resources anyway to do my learning.
The only exception to that is domain names of course.
1) make a course 2) constantly put in hours supporting it.
It's not world changing but it definitely is to his users.
Another example in my case is guidebooks. Sure, a lot of the information is online. But paying $15 for something that lays out the travel information with nice maps and organizes it has paid for itself if I save one hour or points me to a better restaurant.