The real question is: Do you care about the why ? Really ?
She isn't going with you. She is going with someone else.
If you're interested in her as more than a friend she probably picked up on that (women tend to be good at that sort of thing, better than men anyway). She doesn't want to be more than friends. Too bad. Move on.
Just ask someone else and have a good time. Life is long, nothing that happens in High School will matter in a few years time.
Bookmarks