Back when I was learning about stacked Restricted Boltzmann Machines, you could visualize the network's "hallucinations" by introducing noise to the latent space (hidden layer), before recreating the input on the backward pass (to the visible layer). You could take this "corrupted" recreation of the input, pass it back into latent space, introduce noise, and then pass it back to the visible layer to see a new hallucination.
Hinton had a nice animation of this on his U of T website back in the day. You could select a digit (like, the number 5), and then just watch his stacked RBMs hallucinate wobbly, morphing, squished, stretched, distorted 5's in real-time. At the time, it definitely looked to me I was watching a machine "dream".
So, let's suppose this actually was what dreaming is. Why is it useful? Why does practically every living creature with legs and a face dream? How does being incapacitated, inattentive, and vulnerable for 1/3rd of the day to dream lead to improved odds of survival?
Dreaming floods the brain with "fake training data". Like today's AI companies, large complex neural network are short on data. And the same is true for human brains as well. Upon receiving new impactful data, the human brain creates fake data to use as training material. How can fake data help the brain? Hinton figured that in training RBMs, he could get his networks to "learn quicker" if he (I'm simplifying a little here) let his network "dream a little bit" before calculating weight updates (for those who interested, he introduced several rounds of gibbs sampling). Allowing the network to "dream" and create wacky "fake" data made the weight updates much more impactful because instead of teaching *what something was*, it taught the network *what it wasn't*. Dreaming allowed the network to diverge from reality, and when the weight updates were literally "reality minus imagination", the bigger the imagination, the bigger the weight updates.
To understand this in layman's terms, imagine you've never seen a teapot before. When you dream about a teapot, your brain is teaching itself all sorts of wacky teapots. Large teapots, tall teapots, teapots shaped like animals, and teapots that can fly. When you wake up, reality creates a massive weight-update to your brain's connections about what a teapot actually is. A "rude awakening". I strongly suspect this is why sleep has evolved to be necessary. There's not enough "real" training data in reality for brains to learn what "stuff is", so we dream to learn what it's not.
I suspect the challenges of using output-as-input can be solved somewhat by implementing something resembling sleep.
Of course, we living creatures have reality (hopefully). Not really sure what "reality" means for large nets though.