Can be optimal tank, can be optimal dps. Even though vanilla's description of the class aims at them supposedly being tank only.
On the contrary, they hybrid classes, paladins, shamans and druids, can only try to optimize for healer while always remaining sub-optimal in dps/tanking specs.
If the hybrid tax feature is accounted for, then it makes sense, versatility should come at the cost of single task ceilings (paladins should be lesser tanks compared to warriors since they can heal, self-dispel, etc).
But if so, why is warrior dps not something akin to shadow priest level of dps?