> why not just move the guns so they do not shoot through the props?
You can mount guns in the wing, as seen on many WWII fighters, or run through the center of propeller shaft. These approaches have significant benefits, notably the rate of fire is not limited by propeller speed and number of blades, as well as having much more room to work with when wing-mounting (or the case of the P-39/P-63, having significant volume in the nose).
However, these approaches have some significant limitations, particularly for WWI-era aircraft. Most importantly, the wings of WWI aircraft were not strong enough to survive the stresses of mounting (and firing) machine guns. Wings of WWII and later metal aircraft are vastly stronger than the early wood, fabric, and wire bracing wings of most WWI aircraft. Through-propeller mountings are fundamentally incompatible with radial and rotary engines, and really only work with V-type inline engines. Relatively few WWI fighters were fitted with such engines. Also notable, wing-mounted guns must be angled inwards to converge at a desired range, and to be effective a pilot wants a gunsight that helps them estimate range to target. Such gunsights didn't exist in WWI, and so fuselage-mounted guns are easier to aim with basic sights.