what's the meaning of "why though"?

Hi, I'm improving my English and I would like to know what's the meaning of "why though " and want to know when or what situation can I use this phrase . My friend says that a lot when a guy send her text messages. Is this a way to express sarcasm or dislike for that guy text messages? Thank you❤️