Ex help please

So me and my ex broke up at the beginning of the month. He moved to another state for school. We still talk but as friends but we both have feelings still. About 2 weeks ago I had sex with someone just to do it but i dropped the dude asap. I just told him and he got very quiet. Told me he felt sick to his stomach and very hurt. But he's had sex with girls too. Why is this happening? Why is he being this way.