Doing something yourself always teaches you better than watching it, or just being told the answer.
A neat result from pedagogical studies is that being given the worked solutions to new problems to study from is much more effective for learning the material than simply practicing.
Students who were assigned practice problems performed worse on later tests than those given the same problems and all of the worked-out solutions for them. The explanation from the research was - when learning a new topic, immediate practice isn't beneficial because the student doesn't yet know what to practice. If they are lost when trying the problem, they can easily end up practicing the wrong skills by not knowing where to start. Those with the solutions have some of the cognitive burden removed, and are better able to internalize the task and generalize it to later problems.
I completely agree with you on LLMs and I think they'll be a disaster for education. But I've always found it interesting that being given the answer can be useful for learning in certain circumstances.