If you want to recreate a particular experience like being in the US military then developers need to license the representation rights to guns and equipment.
Doing so doesn't represent a necessary endorsement of the weapon manufacturer as much as a commitment to immersion.
Few games have complete licensing.