Lance ended up failing a PEDs control 10 or 12 times over his career but none of that became public knowledge until after he'd retired.. He tested positive for EPO in the 2002 Tour de Suisse but those allegations were dropped after Pharmstrong made a personal donation of $125,000 to the UCI (the governing body of international pro cycling) so they could buy more lab gear. Only he didn't make the check out to the UCI, he made it out to its president, "Fat" Pat McQuaid.
Even if the donation was legit, it still looked hinkey for a governing body to take money from a sportsman they govern.
Before 2005 there was no direct test for EPO. They only could test for hematocrit levels, and if your Hct was >50, they considered it a possible indication of doping but they still couldn't prove it. So if you broke 50 they'd give you a mandatory 2-week "health vacation" but no other penalty.
They first came up with a direct test in 2005 but they needed a way to confirm its effectiveness so they asked the ASO (the TdF people) if they could use some of their archived samples for testing. ASO freezes all the blood and urine samples they use for testing and keep them on file forever. So the ASO lent them a bunch of blood samples, which should have been anonymous because the tubes were identified only by a code number. Except someone managed to find out Pharmstrong's code number. And several of his samples, including some from 1999, tested positive for EPO.
France's leading sports periodical put the story on their front page.
But America chose not to believe them because they're ... well ...
French. And they're just pissed because no Frenchman has won the Tour de France since 1985.
Some people choose not to believe he doped, even after he confessed it to Oprah.