Traditional mathematics classrooms contributed very little to that learning, except for the portion of a university education directed toward mathematics major. And I even have my doubts about that part.
Meanwhile, the best bit of math teaching I've ever done may have come when I was helping my stepdaughter with her algebra homework. I noticed her applying on over-specific rule to a class of formula simplification problems. So I deliberately changed the problem she was working on to one where the bogus rule didn't apply ... :)
I've come to believe that for students of all levels, the most important part of mathematics education is when you coach them through problem-solving. Yes, the formalities are wonderfully powerful and fun, at least to my taste. But they should be a last resort, whether for solving a problem or checking the soundness of a result. Formalities-first is exactly the wrong way to approach things, for math users and math teachers alike.