There's a lot that experts don't know about why people dream and where dreams come from. However, the prevailing theory is that dreaming helps you consolidate and analyze memories (like skills and habits) and likely serves as a “rehearsal” for various situations and challenges that one faces during the daytime.