They would fulfill a role, but only in extreme terrain.
"but ground pressure!"
Its called "designing things". You dont design legs like animators and model creators do, you design them to specifications. For example you could design legs that have large surface area's extending below the center of the spider Mech, this alreasy gives you larger surface area's than current tanks can have. (imagine an "L" shape for a leg with the L pointing to the Mech center so it doesnt take extra space).
Another method which I'm favoring is to use tent-peg like idea's. Similar to a tent-peg it greatly increases the grip on the ground allowing it to climb across extreme terrain a tank wouldnt dream off. UNLIKE A TENT-PEG because somehow someone is going to envision a spider-mech with tent-pegs for legs, the legs would use conical shaped ends. The legs compact the earth as they enter the ground, the conical shape quickly increases the surface-area and also sends forces sideways besides downwards to relieve the amount of pressure the ground below needs. The legs could even have a series of cones at the ends extending towards the center of the spider-mech (again eith an L shape) to spread out the surface area it stands on even more without losing its grip ability.
I did a back-of-the-envelope calculation for an 8-legged spider-mech using excavator arms for legs. If the excavator arms are 1/4rth the size of current excavator arms and 1/4rth the strength then you could build a 120 ton spider-mech (and excavator arms probably use the usual 20% safety margin for maximum forces it can take so it can handle even more under stress). If you keep it at around 80 tons it can lose 4 legs and still keep going.
"but legs are easily destroyed!"
Actually a lot harder than most people expect. Are you really going to fire at a target that constantly accelerates and decellerates and presents a small target? Ofcourse not! You'll fire at where the legs meet the chassis, which puts it inbetween a tank and a wheeled vehicle in terms of vulnerability. A wheeled vehicle can lose several wheels and still be fairly operational. A tank loses a track and its a stationary turret/artillery food. A spider-mech would take longer to disable than a tank but have worse consequences for being disabled.
"legs take up a lot of weight, you can carry less stuff!"
Tracks weigh tons more than wheels but they carry more weight. Legs would have similar properties plus extras. Legs would allow for a far higher recoil compensation than tracks or wheels. This means spider-mechs would be able to carry larger weapons for lower weightclass vehicles.
"its harder to stabilize!"
Wheeled/tracked vehicles go over every bit of terrain, which makes them less easily stabilized. A walker, once the tech is there to keep it balanced, would be far more stable.
The end result: spider-mechs wouldnt replace tanks, but theres tons of terrain where tanks are far too limited. History surrounding the alpine troops show that movement through extreme terrain can give you unparralelled advantages in engaging tanks moving through limited area's, or engaging the supply routes or bypassing enemy forces and striking at construction or forward bases.
Edit: disadvantages of legs would ofcourse include slower max speed (but probably higher than most think), more fuel consumption (although like tracks this could equalize on rough terrain), higher&longer maintenance costs and tougher battlefield repairs. This is practically the same list as between tracked vs wheeled vehicles. Tracks havent edged out wheeled vehicles and wheels havent edged out tracks because they both have their uses. Spider legs would also fit on that scale and have its uses, but as its own category rather than a replacement of legs or wheels.