In the ME 109, Messerschmidt went through a lot of effort to squeeze a cannon into the fuselage firing between the piston banks of the DB engine, exiting the spinner. Why not just put the cannons in the wings? Is it because the trajectory of a center-line shot doesn’t need to converge (as wing-mounted guns do) and therefore has a longer range of sight?
Yes it's because of dispersion. With wing mounted guns you normally "harmonize" them to converge at a point, say 300 yards or 600 yards to have a sweet spot where most of the projectiles are passing through a small area to maximize the fire concentration.
But at ranges closer and farther, the streams of projectiles are more dispersed and their effects are reduced. Watch gun camera footage of strafing runs in something like a P-51, and you can see the bullet strikes widely dispersed and coming together into a tighter cluster as the range closes in.
Putting the armament in the nose eliminates the range issue and you have maximum concentration at any range. The later versions of the 109 with the Mk108 30mm cannon were just about ideal for this because the cannon was very compact and had a really high rate of fire for its caliber (about 4-600 rpm), so a single cannon + two MGs was plenty of firepower and was probably the ideal configuration for the 109.
The ME262 jet had 4 Mk108s in the nose, providing close to the concentrated firepower of the A-10's 30mm 3000 rpm gattling gun. A very short burst would bring down any fighter if it scored hits.