Ask yourself how ISIS got 5 miles from an a Marine base and took down a town within that distance of our Marines. Simple extended range infantry mortars have a range nearly that distance. Chris Kyle had a killing shot at 2000 yards...over a mile. The maximum range of a 50 cal machine gun is over 3 miles.
Only one way it could have happened in my mind. They were ordered NOT to fire on the enemy.
A company of Marines only has about 15-30 minutes of ammo available to them, organically. Unless other support is available, you don’t want to engage before you know you can destroy the aggressors.