Well, walls aren't just there to "sit there and take a lot of hits and don't really have a purpose for attacking." Granted, most of them don't attack, but they usually make their mark in other ways than direct attacking.
Walls tend to focus more on supporting your team, whereas tanks are just bulkier, usually slower versions of sweepers. There's the classic staple of "toxistalling" in which you poison a pokemon, then spam protect and recovery moves to let the damage build up.
Walls are capable of easily setting up stat boosters for other teammates (perfect for Baton passing to teammates that may have trouble doing it themselves) You may try to set up things like stealth rock without essentially wasting a member of your team like so many frail leads do now.
Nearly every good wall has some form of recovery too, while tanks tend to just focus on hitting and going out after a while. Walls can just keep on taking hits, and can be pretty hard to bring down. Say I have sand up, along with a nice wall of my own, but your pokemon keep getting hurt by the sand, while mine are just fine.
You could also have a bulky pokemon carry something like heal bell to help out your teammates that have status crippling them. Strong offenses and attacking is great in the game, but it's not the only key to victory.