Why are recurring dreams usually nightmares?

Recurring dreams may feature taking a test the dreamer didn’t study for, having to make a speech or being attacked. Here’s why our sleeping brain comes back to these unpleasant dreams again and again