Do you really think Snap-On manufacturers every single part of that gun in-house? Do you really think Makita imports every single component of their tool?
You're also way wrong about the amount of money invested in a pneumatic tool vs. cordless. Pneumatic tools are easy, simple, and haven't changed much in overall construction in 80 years.
It takes highly specialized tooling to mold the cases on an electric tool, the fixtures and machines for winding motors are expensive and highly specialized, the control electronics for each type are bespoke, and figuring out how to package it all is no small feet.
A guy in his basement with a mill and a lathe could honestly make a working pneumatic tool from solid blocks of metal. Can't say the same about an electric impact.