Dreams are a result of your synapses firing randomly and then getting filtered and processed. It is very different from the process of observation that leads to storage in long term memory.
Basically, when you sleep, your brain tosses up all the stuff you’ve experienced and thought about and then starts sorting through it randomly. Your brain knows that this data isn’t “real” and meaningful, and so doesn’t bother to store it.
If you want to remember your dreams, try to wake up while you are dreaming. Then quickly write them in a journal, because dreams are quickly forgotten. Furthermore, keeping your dreams in a journal has been suggested as a way to lucid dream (control future dreams).