Simple materials cost isn't enough to calculate the true cost of manufacturing a firearm.
There are recurring overhead costs including buildings, insurance, utilities, salaries, healthcare, accounting, administration, taxes, etc. Then there are the non-recurring costs like R&D costs, machinery, molds, dies, etc.
Then there are the marketing costs, packaging, transportation...
It may take several hundred thousand to millions of $ in expenses before the first gun makes it to your hands. Costs must be averaged into each firearm before profits can even be thought about.