system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why we tend to wake up right at the good part of a dream 

I guess one of the best examples is right before any kind of sexual act is about to be performed (in said dream), but definitely applies to more than that.  Or the question could be geared to be "why does the best part of our dream occur right before we wake up?"
gpt
I think it's because when you are woken up during a dream you are more likely to remember it. Dreams stay in your short term memory, but don't tend to write to your long term memory unless you actively wake up and try and recall the details.

So you may have had plenty of dreams that played out to 'the end', (whatever that is). But if you weren't woken up during them, it is far less likely that you recall them.