You make a good point, however, in the realm of science fiction, you can make up any device to suit whatever story or action you are trying to create. Who's to say a gargantuan mech won't have some sort of defense mechanism? It certainly has the power and space to do it.
I love mechs as much as the next guy, but I have trouble believing in the practicality of them. Tank treads are a much more efficient method of movement compared to legs, and while legs do have more versatility, it just isn't easy to program a system that can take in to account all sorts of obstacles, not to mention the energy required to motorize such movement compared to how easy it is to make a wheel turn.
Of course, in science fiction, we can just say mechs have fusion cores or something.