(Semi-long technical post incoming)
The game attempts to compensate for high ping by taking ranges of movement rather than single points. For a class like sniper, this makes the collision detection area much larger, since the server doesn't know exactly when during that 167ms period you actually pulled the trigger. It assumes a range and if there was a head inside that range during that time, boom headshot.
This is more problematic for classes like Pyro where, while sometimes it's nice to cover a large area, generally you're trying to hit something specific. So, if you're wildly flailing around (like I usually do) it sees the range I was firing at, divides up the damage amongst it, and for every second of playtime it only counts about a quarter second of burning.
Throw on top of all of this that the program only calculates stuff on a framewise basis and you start to see the problems I was having before getting a new video card. Realistically in order for the game to process everything 'properly' you're going to need 60+ fps and a ping low enough for two roundtrips per frame, which comes out to 4ms. That's never going to happen in online play, so the engine is forced to make a compromise, and as a result some classes are better than others in high-ping low-framerate situations.