Why would a guy say this after looking at me for a joke?

In work a male Coworker of mine made a joke and then looked at me for a reaction and then said “did you like that (my name)?”
Why would a guy say this after looking at me for a joke?
Post Opinion