Player 1 goes all-in. Player 2 has player 1 covered and calls. Player 2 flops two pair, but player 1 turns a straight. Player 2 angrily throws his cards into the muck after the turn and his hand cannot be retrived. River gives player two a full house. Who wins?
Technically the hand is over when player two mucks his hand, so the last card is not really dealt. Player two does not have a claim to the pot. You need live cards for that.
Having said that I could certainly see a ruling going in player twos favor. Most cardrooms really try to get the pot to the best hand even when something goes a little askew. If I was player one, and I had seen player two's hand, I would let the dumass have the pot.
In a live cash game, the floorman might rule player 2's hand dead, and the dealer might not even deal the river. Or he might rule that once it was properly tabled, his further action of folding made no difference and award the pot to player 2. Depends on the house rules and the floorman.
But tournament rules are different. Once players are all-in, all the hands must be tabled face-up before any more cards are dealt, and players are not allowed to fold, so the river must be dealt and the pot must be awarded to player 2 (though he will probably also get an "unsportsmanlike" penalty).