It's the network that is compromised. If you operate enough exit and relay nodes, you can be pretty damn well sure of where the traffic originated.
Anonymity hinges on the nodes, if an entity controls most of the nodes then the network is pretty much an effective honeypot.
Given that the FBI has been incredibly vocal about their efforts to take down Tor, and the fact that it is synonymous with illegal activity (drugs and child porn); operating enough nodes to investigate and bust criminals seems right up their alley.