While the magneto does produce enough current to charge a battery, that’s not its primary function. However, small gasoline engines use a magneto instead of a battery to generate the power for the spark plug.