It's simply how the bidding works. Someone is willing to pay more than you for the same item. If you do your homework and know the going price for something, then you know at least you won't overpay, but maybe the other guy does. But to get it, they definitely will be paying more than you. A last second field goal in a tied football game still counts as long as the ball is snapped prior to time running out. Same here.
And yes, it's amazing they've had those sniper programs out there forever it seems. I've never used them, because I don't normally bid on stuff that I'm not willing to put up the max on my original bid. Occasionally I might if it's something that I really need and is tough to find. You can't beat the computer 99% of the time. So the program will snipe, but then, you have to tell it the maximum too IIRC. So for example, an item is currently a $10.50 with 20 seconds left, you bid a max of 12 bucks. The "sniper" had programmed his maximum snipe for 11.95, then at .05 seconds left or whatever, it bids the 11.95 but loses because you've already bid 12. Snipers don't always win. Except those idiots with more money than brains. It would technically be the same had they bid 11.95 early in the auction, but that only tips their hand allowing people to overthink it. When I bid on stuff and if I get a good deal on it, great. If not and I lose out, I just keep searching.
As was said before, if you really want it, decide what maximum it is worth to you and bid that amount and check in after the auction. Or at least accept the loss once it's over if you watch it and lose out to a snipe bid. You don't always win because someone wants something more than you do and price sometimes isn't the main factor to them.