The story
A slight twist on the normal convention when flipping a coin, which is heads I win, tails you win. The flurry of antonymic reversals — heads or tails, you or me, win or lose — sounds euphonious and might seem fair upon first hearing, which makes the phrase suitable for a fast-talking confidence trick except to the extent that it has become hackneyed and synonymous with rigged arrangements.
Etymology from Wiktionary, CC BY-SA 4.0.