While trial and error is an important part of the scientific method and discovery, it is actually a really inefficient way to learn. "Learning from your mistakes," is revered by pop-culture, but empirical studies show that the best ways to learn are by example and through practice.
If learning from mistakes was such a good method, gambling debt wouldn't exist, people wouldn't experience multiple break-ups in their lives, people would quickly get job offers after failing in an interview, anyone who wanted to lose weight would do so easily, and nobody would be late on a regular basis.