You don’t need to but playing other classes benefits the player immensely
A tank that never plays hunter will not generally tank in ways that will maximize the hunters dps because they don’t understand what it’s like to be deadzoned or have to mess up your sniper training buff
Understanding different classes allows you to respect other players a lot more in general, and it’s also extremely helpful in terms of PvP