EDIT: The reason I bring this up is that it seems as though the prevailing reductionist perspective on dreaming is that it’s “random noise” created by the brain. This article effectively says the same thing, but says that the noise is created by arbitrary muscle twitches during sleep while the brain “learns the body”.
Jung and his students spent a huge amount of their time looking for patterns in that “random noise”.
It’s entirely possible that there are layers to the purpose of dreams. Yes, they could help the brain “learn the body” better. But why those specific dream characters and not others? Why those specific scenes and not others? How do those scenes and characters relate to what’s going on in a person’s life right now?
It seems unlikely that evolution would produce very wasteful complex processes - it seems far more likely to me that they also serve a use in a certain type of psychological (and therefore ultimately physical) energy dissipation or tension resolution - an idea that seems to come up through Jung’s insights.
Jung and his students then analyzed out common themes in the symbols in people’s dreams and discovered themes that were common across cultures, implying connections to common biological and sociological patterns (e.g. the fact that each of us grows older facing different kinds of challenges along the way).