People have dreams because our minds continue working even though we fall asleep.
(The passage is not providing a direct answer.All it talked about are the phenomenons related to dreaming.I could derive the answer from "These thoughts can carry over into dreams." and "The mind works hard when we dream." The author agrees implicitly that our mind is very active while we are sleeping and henceforth,the dreams.)