The intuition for why this happens is that the losses of the majority are made up by the big gains of a minority. You can even see that after two iterations:
Case 1: two heads -- 225% wealth Case 2: heads, tails -- 90% wealth Case 3: tails, heads -- 90% wealth Case 4: two tails -- 36% wealth
So, most people are losing money but a single lucky guy makes enough money that the expected value is still positive.
If you run a simulation with a low sample size, you might not see this effect because the "lucky guy" case is rare (and gets more rare with more iterations).