I'm afraid not only guys are like that, girls do the same thing. Don't know why they do it but I'd suggest that you look at it as having been saved from being with someone who didn't like you in that way.
It's a fact whether we like it or not that us guys will do anything to get a bit of you know what at that age. It's not like we deliberately set out to do it,or though some do. It's a case of that "young, dumb and full of cum" thingy and thinking with our other brain - the one between our legs