That assumes that anyone/everyone who plays a Tank-viable class as a DPS would be capable and willing to Tank whenever they wish because they have a Tank-spec available to their class. That is not true at all. Let's be clear that Mages, Warlocks, Hunters, Rogues and Shamans lacking a tank spec are not the root cause of the Tanking problem. This is nothing more than an easy scapegoat; an ill informed excuse.
You need to have the gear. You need to have the experience. You need to have the mere willingness to tank. It's not just given to you from merely having the spec that allows you to tank. Someone maining as DPS will very likely continue to play as DPS if that is what their toon is meant to be. If they are brought in the raid to Heal, then they are maining as a Healer. if they are brought in to tank, they are maining as a tank. A Paladin who is queuing as DPS is not queuing as a Tank or Healer. That's how it works. The reason why there is a tank shortage is because of this reason; not that there's a lack of tank options but because even if there is a tank option, people are choosing to refrain from tanking.
A majority of Tank-viable Class players are not using them to Tank, even if they have full access to those specs. That is simply a fact of the matter. Anything else here is really merely an excuse.