Why would a person make you jealous when they know you like them?

I confessed, got rejected and played with for multiple months afterwards