The enemy never came out to play when we had helicopters on station. Planes high in the sky didn't stop attacks until they dropped bombs.
The same concept can be seen with infantry and crowd control. The best way to keep a crowd away is to fix bayonets.
I guess that OP's point is that the AC130 not only has two Gatling guns but also a 40mm canon and a 105mm Howitzer.
Also, the AC130 can loiter longer, and doesn't require fly-bys to even be able to target. It just does pylon turns while showering a target with everything it has.
Given the alternatives, people have to ask what does the A-10 bring to the table, and the answer is hard to come by.
Gets on target faster, is much cheaper, doesn't need half a brigade to crew, and can take a lot more punishment (especially compared to the barely armored AC130J).
The Ghostrider / Stinger II variants which are in service today have 1 30mm bushmaster auto cannon, 1 howitzer and a bunch of guided munitions.
The recent variants have been criticized for not being able to provide the same level of air support as the older variants or the A-10 in built up areas or for danger close missions.
They lack the volume of fire needed to effectively suppress enemy infantry as the 30mm bushmaster has a rate of fire of only about 100 rpm and the next thing in line is either a 105mm howitzer or a hellfire missile/SDB which might be too high profile for many engagements.
And most importantly unlike the A-10 the air force isn’t willing to employ the AC-130 in anything that even comes close to a denied air space so if the baddies have anything larger than a Dushka good luck…
I am not an expert at this stuff.