In open field you have a good point, and smart bad guys go around the tanks and kill the casters first - or use ranged weapons at the casters. But in windy dungeons (i.e. with narrow hallways) that is not so easy and one or a few tanks can effectively block access to the casters in the back.
Also, it's a mean DM that makes a pack of wolves or a wyvern that intelligent to attack casters first. They should just head for the first meat they can see, which should by all means be the martials in the front.
So, saying effectively the same, but changing the emphasis: Melee can perform the role of defender, except in the case of an open field combat and intelligent opponents.