The answer is pretty simple. The highest bidder within the given time is the winner. No more no less! If you get sniped, you should have thrown in a higher bid. I really really don't get it people could have something against it. Get over it. I too don't like to be sniped but it happens. If I want an item, I'll throw in my maximum bid at the very last second. If I get it, I'm happy, if not I'm not going to cry about it, should have bid more or will get the next item.
I pretty much always snipe. There are a few online-friends I wouldn't outbid, and I've helped out a lot of guys on here and other boards too.