But APCs are not designed to carry heavy weapons.
Why should you invest money and compromise weight, squad strength, dimensions and need additional crew if the mission doesn't requires it.
The mission of mech infantry is to accompany tanks and vice versa, perform classical infantry tasks when needed while also having the ability to fight when mounted on a mobile engagement (with the weapons of the vehicle and their own ones to a limited percentage).
For this tasks you need a vehicle which can follow the tanks, and has enough weapons for engaging at least enemy vehicles up to IFVs and a limited AT capability, as well as can give support fire to the squad when it dismounts.
Light infantry is there to fight in heavy wood, MOUT, etc.
They don't require a vehicle which is able to all the tasks an IFV can. They need a transport which gives them limited protection while on their way to their destination as well as self defense capabilities against soft targets.
Heavy weapons are in the heavy weapons section of the btn.
There they have their man portable ATGMs, auto-grenade launchers, HMGs as well as heavier weapons like heavy ATGMs and 20mm on weapon carriers.
And they are able to use them there were they operate.