If I understand your question correctly, this is called "running it twice". You can even "run it three times" (or four...) if you want.
It's sometimes done in live games (and the option existed in Full Tilt Poker too) when the players mutually agree to run it several times.
Note that you're not forced to run it several times on the flop: you can "run it twice" on the turn too. In that case you'll only run the river card twice (that is: dealing the river card two times in a row).
Technically the goal is to lower the variance associated with pre-river all-ins. When there are no more player decisions to be made but cards still to come, the outcome depends purely on luck (also called "all-in luck" by several software).
Say you're 50/50 with a flush draw versus some made hand. If you play normally (that is "running it only once") you'll typically either win the pot (you're running good, in that you're expected value is only 50% of the pot yet you won it all) or lose the pot (you're running bad: you lose everything although your expected value was 50% of the pot). In some cases you'll split, but this is less common.
Now if you run it twice you're more likely to split by winning the first run and losing the second one (or vice-versa).
If one player wins both runs, it's exactly the same as if you had played a normal deal and the player had won the deal.
I couldn't figure out what was gained by winning twice...
Nothing special is "gained". There's still the same amount of chips but that amount is divided in two (or three, etc.) stacks and the first stack goes to the winner of the first run and the second stack goes to the winner of the second run (typically players/dealer do not bother to split the chips before the end of the runs so that if there's only one winner, no time is lost counting/splitting the chips).
Now there may be funny cases: imagine you have quads with 77 on a 877 board and your opponent has 88. There's only one card left that can help him win the deal (the last 8, so that his quad 8888 would beat your quad 7777). You can decide to "run it twice" and you're sure to win at least one of the two runs.
(numbers below are a bit approximate, it's late)
Why would one do that? Because it can be very tilting to be 95% favorite and to get a bad beat for a big pot. So you'd rather run it twice and have 90% to win both runs and 10% to split instead of 95% to win and 5% to lose everything. Your opponent may accept because he may prefer to have a 10% chance of splitting than only a 5% chance of winning everything.