>That's kinda like saying you can learn to drive by just getting into a car, crashing then thinking about how not to crash it next time.

That would be a perfectly valid way of learning to drive if crashing had no danger or destruction and you could instantly reset the car every time. Software is a special case of engineering where the cost of failure is extremely low, so trial and error is generally the fastest way to get going with actually doing something.

It would be an incredibly inefficient way of learning anything. You might as well say you could just rediscover all of human knowledge by just observing the world and doing your own experiments. Turns out standing on the shoulders of giants tends to get you further.