The answer is that the highest bid always wins, regardless of when it is placed. But the reality is that many, if not most, people do NOT place their highest bid at any one time; they bid what they HOPE to pay, just enough to stay ahead of the competition. These pesky folks are called nibblers
Consequently, if a nibbler has the high bid while the auction is going on, he leaves it as is and does nothing. But the minute someone comes along and outbids him, he comes back with a higher bid, and the bidding war ensues. The price is driven higher, often outrageously so.
But if no one else outbids him, the nibbler leaves his bid alone--until a sniper comes along at the last second and swoops the auction with a nice snipe. Had the sniper bid the same amount during the auction, the nibbler may well have come back even higher. But since no one else came along until it was too late to bid again, the sniper gets the prize.
This obviously does not always happen; it does not when the proxy bid is higher. But most nibblers are not willing to admit that they will actually pay $100 for that item; they prefer to bid $20, and then keep bidding higher, even past the $100. If they simply decided the amount of the snipe and walked away, they would avoid the bidding war, and maximize their chance of acquisition. That is the point of sniping.