Great tanks in 5e do have mechanic(s) that make them worth attacking or make their allies less worth.
Some of them (Totem Barbarian, Cavalier Fighter) have means to impose disadvantage on attacking their allies or advantage on attacking the tank (or both).
Some of them (like feat Sentinel or Cavalier Fighter) have ways to stop the move of the enemy who wants to pass them to reach more squishy allies.
Some of them have ways to counter when ally in their vincinity is attacked (like Cavalier Fighter).
Some of them can shield their allies or take damage of them (like Abjurer Wizard! Also a tank!).
There are more examples, just these four came to my mind first.
Most of tanks have also high AC and/or HP to be able to be attacked more times. It's not a bug, it's a feature... when there is a mechanic to 'aggro' enemies or shield them in other way.