From a "realistic" perspective Mechs make no sense.
I actually am going down this rabbit hole specifically because I came up with what I think is a rational technological justification for mechs.
The idea is basically instead of just armored walking tanks (which is what Battletech canon says), mechs have really strong forcefields that shed a lot of EM radiation that messes with remote communication and can fry any fragile transistors.
So like, a lot of the stuff we use today - cruise missiles, drones, and the potential of stuff like self-piloting computerized vehicles - don't work because the EM release of the shields will fry anything other than a pretty simple system with a lot of hardening.
The way shields would work is that they 'harden' against impacts from the outside, but normally they're uni-directionally permeable so you can launch your own missiles and fire your own ballistics. When something impacts, the shield pumps some energy into the spot hit to nullify the whole impact. However, if you get hit in rapid succession in different locations, the shield struggles to recalibrate to block them all.
Basically, multiple scattered hits bring the shield down faster than singular big hits. A big cruise missile like a 1 ton Tomahawk is less useful than peppering a mech with a half-dozen 10 kg rocket propelled grenades. This brings the range of engagement much closer than what happens with modern smart missiles.
You could also just totally obliterate a mech with a cruise missile (or a high-explosive tank shell) if you could hit, but you'd need to time it right to hit
after you drop the shield but
before the shield can get back up. The three main weapon types are thus:
Lasers - go through shields, but do fairly minimal damage.
Small Missiles - best at dropping shields.
High-explosives - best for killing shots.
Also, the shield has to be a complete shell or it quickly loses its stability and collapses. If you put a shield around, like, a tank, the tank treads would be spinning against the inside of the shield, but would barely transfer any force to the ground beneath. If you put a shield around a plane, the airflow would be blocked so you couldn't get lift.
But due to the way biped locomotion works, lifting the feet and then striding, you can put shields around a mech and still be able to move.