It's because girls are taught to be suspicious of any man they don't know. Most guys would take the compliment and be happy, even if it was from an ugly chick. Men aren't allowed to show attraction to random women anymore, according to some people, unless they're either good looking or rich of course.
This really only applies to a minority of people though. I think most people would just say thank you and move on, not cause a big stink. If the person was persistent though, that can justifiably cause a negative reaction.