I have a really good friend that I started really liking as more than that and I told her and she just told me that she could never think about me like that but she continues to do things like intentionally letting me see her in her underwear and just generally flirt with me.
Girls are just bitches really. I mean that's honestly the answer. I know tons of girls that have boyfriends but flirt with other guys and hang all over them. They're just empty, shallow girls that are trying to fill a void in their life.
I'm sorry you have to put up with that. Some girls are wired in a way where they feel like they need to have every guy they know wanting them. I've seen my male friends and brothers go through this, and I can't believe how cruel these girls are. They have a pathological need to be desired, and no concern whatsoever for anyone's feelings except their own. It's awful. I couldn't do that to another person, and most of my friends couldn't either, but there are, unfortunately, tons of women like that. I'm not totally sure what to say to help you with this, except that I think as you get older it becomes easier to identify who is like this and who will actually treat you like a person. At least it's been that way for my brothers, thankfully.
Well, most females do it simply because they see a male as a really cool person, they legitimately like that person, or do it just because they don't think of it as anything more than a game. If it really bothers you that she flirts with you so much, you should simply tell her.
A) Some are just testing you to see if you've got the social skills to deal with their shit tests.
B) Some do it for validation and ego stroking.
C) Some are in relationships and may be testing the waters before jumping ship.
The list goes on and on I'm afraid. Most of the time though just don't be affected by their games and when they do try to toy with you don't fall into their web. The only way to win that battle is not to fight, so to speak.