Why would someone behave like this?

So, basically they were purposely pulling away from me and talking to other people (basically ignoring me) and I have been really keen to talk to them without coming off as needy. Once I put my energy elsewhere and on other things other than them, they kept blowing up my phone for absolutely no reason and it was a major turn off for me.

Why would someone behave like this?
Post Opinion