According to Freud, the reason why we dream is a 'daytime residue' that spills over into the night. When you are going through something that you can't deal with, when your defences are not adequate enough to deal with the trauma in consciousness, that is when your subconscious mind tries to play it out.