The problem is that (in terms of combat) you add a whole lot of complication with very little gain. Building a bipedal mech that can walk on it's own (even without enduring recoil from firing a weapon or receiving fire) is a huge engineering challenge in and of itself. Designing for combat scenarios is even more daunting.
But let's say you throw 3 decades and trillions of dollars at it. What do you gain?
Advantages:
-Higher firing position
-Possibly better performance in some terrain
Disadvantages:
-Much larger profile in the vertical direction, meaning you're more vulnerable from [I]all[/I] sides.
-Worse performance in almost every terrain.
-Loading is distributed much more compactly than a tank, meaning the odds of destroying a bridge or other structure through shear stress are much higher.
-The trade-off between armor weight and movement speed will never match that of a tank.
In my eyes, there's no real advantage to building giant mechs in realistic terms. I think the thing we'll see that comes closest to it will be exoskeletons.
Ya, I've heard about them. They've got the right idea and are the closest to executing it. Other fools in the space are trying to make one for direct combat. Tanks are much better.