Why did he sex with me if he was going to break up with me after?

The guy I was dating was acting a bit weird with me. He was acting a bit different like ignoring my texts for a couple days which wasn't him. He texted me back finally but it was something sexual. He invited me over and we had sex. The only reason I really came over was to see why he was ignoring me and he said it was no biggie and that he was just busy. It was weird for him to say that but he got frustrated at the questions and asked me was I trying to have sex and if I wasn't I could leave. We hang out all the time and talk like that so I didn't understand him. Two days later he dumps me out of nowhere and im pretty sure he had it in his mind to dump me before we had sex cause of his distant behavior.

Why did he sex with me if he was going to break up with me after?
Post Opinion