Confused. Why did he do this??

So today when I was walking out of sev, this car drove by and my ex was in the passenger side and yelled "Slut, whore, bitch" at me. So I was just like whatever. And got in my car to go cruising. Then I was on the highway and I noticed a car driving super fast to catch up to me and so I turned onto a gravel road and it turned with me. I was going pretty fast but slowed down when I noticed that it was trying to pass me. I didn't want to lose control of the vehicle. When they drove past me, he threw something at my car. And the driver drove away extremely fast. Then he started texting me calling me names and saying to meet up cause he has someone that would love to beat me up. I am pregnant with his baby. And I just don't understand why he acts like this towards me?? Plus he told me to meet him at the bar and he'd give me the money that he owes me but I ended up leaving after an hour of waiting. Why is he like this?