Some riders dope to be able to win races. Others have to dope just to be good enough to make a pro team.
I think there are an extremely small number of riders who are on pro-teams but don't dope. Those are the guys who would be good enough to win bigger races if they weren't doping, but instead don't dope and are still good enough to be domestiques instead.