Reflecting how many you bring. Warlocks are sort of demanded for various fights, banishing during the Garr fight comes to mind. You also want to bring fewer melee DPS, as there are various mechanics that are more manageable with ranged DPS.
So 4-6 warlocks and 2-3 warrior dps is the usual composition. If you do bring 6 warlocks, you also tend to bring a shadow priest as well. It sort of depends on what is available on your server. Even if you're tryhard min/maxing, you still would rather bring 6 highly skilled warlocks rather than just 4, then maybe cut down on Mages if you can't find good ones.
The same goes the other way. If you can find 4 warrior DPS that all got off-tank gear, running through BRD 10 times a day to get the epic 1H mace, and running to Rend in UBRS 10 times a day to get the dagger. You will obviously make room for those people, and cut down on the less dedicated Rogues.