Sometimes a weapon is in the "legs" and what it really means is it's mounted on the hip. If a mech has ammo in the legs, maybe we could imagine that it's got an armored housing of some kind on the outside of the hip, kind of like it's wearing a holster. That part doesn't have to move with the rest of the leg. It could basically be an extension of the torso, but positioning wise it still counts as part of the leg.
Advantages could be faster reloading times, an experimental partial-CASE system (theoretically the ammo is supposed to explode outward, leaving the mech intact, but maybe the damn thing doesn't work right), extra space in an already cramped design, etc. I could see why somebody would try it.