Why do they do this?

She clear has a boyfriend but told me this (though I don't believe entirely)

"I had a sex dream about you and I was saying all this weird shit that when my roommate grabbed my leg I kicked her in the face."

I responded with a "...oh damn" attitude.

But seriously what is with this shit? I know why we stay away from exes. I understand why but the chick has a boyfriend who she "loves" I'm here wondering I wonder how many girls actually fucking do this shit. I'm starting to just feel bad for the guy. I'm not letting this get to my head it's just I can't see how some girls have the idea that it's okay. What has everyone experienced when talking to an ex randomly?