Also (another EU explanation) the quad cannons can be locked in the forward firing position and fired from the cockpit in similar fashion to the fixed guns of an x-Wing or TIE fighter.
I don’t think that’s EU, because…
In SW Han was going to shoot the lone TIE Fighter from the cockpit before entering Death Star.