Well, the way it works is really simple.

Based on what we know (we don't know the specific order of the cards in the deck, but we know that it is supposedly well shuffled and randomized) but we know that there are 9 diamonds left unseen when I'm holding 2 and there are two on the flop, so I have 9 outs, and the odds of me completing my draw are 35%.

So I don't act on whether or not my card will come out on this particular hand. I act on pot odds, which tell me that if the statistics do actually work out, I lose my bet 65% of the time, and win my bet plus the pot 35% of the time. I'm not acting on the cards at all here, I'm acting because I believe that I am acting profitably.

Also, the odds of me losing this hand 10 times in a row?
1.3%

20?
.01%

So there's good odds that even though I'm losing my bet a chunk of the time, my winnings will have me break even.