In my opinion dreaming has nothing todo with evolution. I think it could be extremelly helpful but i dont think it happened over time. U either have the brain power to dream or u dont...
On the note of it being helpful i aggre with whoever it was that said that its a simulation tool that can help u work out dofferent problems.
I think almost all of us are not capable to exploit its power yet... When we dream we dont really have control over the dream but imagine if u could actually "wake up" in ur dream.
Some dreams look unreal or unachievable when compared to our real life boundaries so if u think about it then maybe if u can learn how to awake in ur dreams u can imagine whatever u want, lets say i want a Ferrari...
And it will appear and u can drive it and what not...
Its a very basic example but if theres some truth to this it will be ground breaking as u would be able to do research in ur mind using different equipment without actually having that equipment so it could save money

The only problem would be that in ur imagination it will be hard to imagine something that u have never seen so i guess that if at some point we discover a way to use our dreams productivelly it will be done by ppl that are familiar with what they actually want to use.
Example... Lets say i want to build a plain out of wood using a perticular type of wood. (Forst thing i need to do is go and visualize that type of wood if i havent seenit before)
Then i do the same with every piece of equipment i will need and if i need any electric equipment then i ll need to know how to use that equipment.
Now that i know all of that I wont need to go and buy everything and start doing planning on how my plain is gonna be assembled.
I can dream it all and try to find the best possible way to assemble a wooden plain so that it could fly efficently.
After im done with the dreaming and i have figured out my plan for the build i can go and buy the exact amount of wood i need, all the instruments i will need to build it and assemble it in the quickest way possible as i will have already done it in my mind.
It sounds too good to be true but its not that crazy of an idea
