It's absolutely legal. You made an offer as did others. That's not a binding contract.
Since you posted this in "Investment Properties" and you planned to pay cash, I'm going out on a limb and assuming you're a flipper/rehabber.
I'd be willing to bet the winner loved the house as-is. They probably wrote a letter about it. Sometimes a seller would rather take less money and sell the house to someone who will love it than to let someone come in and destroy something they've cherished for decades. It's not always about who is throwing the most money at them.