In cycling culture, some things are definitely legal or illegal, but there's a considerable grey area of "don't take the piss". It's technically illegal to draft team cars, but you'll only get penalised if you're a jersey contender or you're being blatant about it. The sticky bottle and the magic spanner are the stuff of cycling lore.
That attitude partly explains the historical prevalence of doping. There was no honour in using drugs to win a race, but there was no dishonour in using drugs just to get through a tour. Nobody minded very much if a domestique took a few pep pills. Doping only really became a major issue after the Festina affair, when it transpired that leading riders from a successful team were systematically doping to win races.
That attitude partly explains the historical prevalence of doping. There was no honour in using drugs to win a race, but there was no dishonour in using drugs just to get through a tour. Nobody minded very much if a domestique took a few pep pills. Doping only really became a major issue after the Festina affair, when it transpired that leading riders from a successful team were systematically doping to win races.