Sometimes well-meaning teachers will tell you that “the most important thing is that you just have fun”. Of course you should enjoy playing jazz, but learning how to do it, and getting good at it, will sometimes involve hard work that, well, may not seem fun at the time. Famous jazz players aren’t famous because they have more fun than you do. They are famous because they are really good at playing jazz. They might have a great time doing it, but it certainly is not the most important thing. Just messing about, having fun may not get you very far!
Children certainly do learn through free play, but not the technical nut-and-bolts of advanced things. Freedom and structure are both important; education shouldn’t be a binary “either-or”. Formal, structured teaching and disciplined practice shouldn’t be damned on the basis of experiences of bad teaching in the past, though.
Another problem with the “it’s just for fun” approach is that in some cases it can also be based on a disrespect for jazz music. As in “jazz is just a bit of fun, but it can’t be serious music”. That is also odious. Creativity, fun, discipline, knowledge, exploration, joy, anguish: they are all important and beautiful parts of learning music!