My theory is that your brain and your body needs to let off some steam. If you are stressed or frustrated, or haven't given yourself time to come to terms with things, your body sends you a sad dream and makes you cry as a way to "let off steam". You know how crying is good for you? You get pent up feelings out. Your body is just sensing that you need to do this, and lets off some steam for you in your sleep. You probably feel emotionally more "sorted" as a result!