Why would a guy go out of his way to get my attention if he doesn’t like me?

This guy (who has a girlfriend):

-would always come up to me first and start a conversation
-constantly asking me about my love life
-gets mad when any guy is showing me any kind of attention
-gets mad when I am seeing anyone
-makes a lot of sexual or flirty comments towards me
- always tries to make me jealous (his friend confirmed this but won’t say why)

He does all this while excessively letting me know that we’re “just friends” when it’s uncalled for. For example, I asked him how to spell his last name and he spelled out “friend”. I’ve never flirted with him or made any advances towards him. It’s making the friendship really awkward.

I’ve blocked him because, I got tired of the mind games and antics. Now he is trying even harder to get my attention despite the fact that I told him that I’d rather not be friends anymore. According to a mutual friend, he is upset because he thinks that me and this friend are now romantically involved.

Why does he want my attention this badly if he doesn’t like me? I hate it when people just flirt for attention. It make it hard for me to take other guys seriously in the future because I’ll think they just want an ego boost as well.
Why would a guy go out of his way to get my attention if he doesn’t like me?
Post Opinion