Look at the threats. Enemy artillery (tube and rocket) will hit us if we mass before the attack in observable areas - this is where being mounted helps. Other than that, the enemy artillery won't chase around dismounted soldiers with fire missions. As our attack commences, the enemy's artillery is probably going to shift to counter-battery fire, or trying to disrupt our depth and reserves.
As we close into and out of the attack position, the enemy will largely have three systems to hit us with: mortars, direct fire from missiles and guns, and direct fire from small arms and machine guns. Yes, being buttoned up in a APC can mitigate the threat from machine guns, but so can moving behind a main battle tank. Direct fire anti-tank systems and enemy tanks will brew our vehicles up, passengers and all. Mortar fire will be (and always was) problematic. However, when you weigh the chance of a mortar round catching a section moving on foot behind a tank to that of an anti-tank guided missile or recoilless rifle smacking a 35 ton armoured vehicle moving at about 10-15km (because that's all you can really do buttoned up), I'd offer that the latter probably has a better chance of being catastrophic. You can't reduce risk to nil, but you can mitigate it by "not having all your eggs in one light armoured basket."
This is where the Company Commander earns his money. The attack position is, according to Land Ops, "the last position held by the assaulting force before crossing the LD...not under direct fire or observation and not a known or likely adversary artillery target." The commander has to select a good attack position, one where the bigger danger to his or her force transitions from indirect fires to direct fires.