It was, in large part, due to the large increase in organic AA (Integrated Air Defense System ???) during the war in
some armies.
British expeditionary force in France in 1940 had four of these per battalion according to the "book".
Later in they put two Bren guns on each mount.
The next size up AA gun in the British Army at the time was the 3in 20cwt AA gun. 120 with the BEF in France but along with 48 of the 3.7in AA guns they had to cover 9-10 field divisions, the airfields, and the port facilities.
a somewhat updated relic of WW I
By some point in 1944 most British infantry divisions in France had 72 of the 40mm Bofors guns plus assorted 20mm guns and a varied assortment of the good old Bren guns on AA mountings. The 3.7in went with the Army but wasn't mobile enough to really keep up with the front line troops.
The Americans and Germans also had vast increases in Light AA guns during the war.
for the Americans the armoured divisions started with these in NA
A 37mm and two .50 cal
from wiki so take as you will.
"The M15 was first used during
Operation Torch, the November 1942 Anglo-American invasion of North Africa. Tracer ammunition from the machine guns was used to bring the main gun onto the target when engaging enemy aircraft. T28E1 crews shot down more than a hundred aircraft during Operation Torch, the
Battle of Kasserine Pass, and the
Allied Invasion of Sicily, shooting down thirty-nine at Kasserine alone. ......During the Allied Invasion of Sicily, 78 T28E1s helped provide anti-aircraft fire for the invasion force. They were especially effective against low-flying aircraft, like
Stuka dive bombers. T28E1s were used in Italy until the end of the war. "
The T28E1 was the early version without armor on the gun mount and with two water cooled .50s with the 37MM.
Wiki again "Each US Army
armored division was allocated an anti-aircraft artillery (AAA) battalion of four companies, each equipped with eight M15 CGMCs and eight
M45 Quadmount-equipped M16 MGMCs. At
corps and
army level, each AAA
battalion was equipped with thirty-two of each vehicle. After first seeing action in the Allied invasion of Italy, the M15 and M15A1 served through the rest of the
Italian Campaign, the
Allied invasion of Normandy,
Operation Dragoon in southern France, and throughout the fighting on the
Western Front. "
Infantry divisions would be equipped with similar numbers of guns, many on trailers or trucks.
The French were knocked out early, the Italian industry could never keep up with demand, the Japanese likewise had poor designs, and nowhere near enough of what they did have. It took the Russians a while to get the numbers needed into the field.
Success or failure of one countries dive bombers/close support aircraft has to take into account the AA defences of their opponents and not just the opponents fighter assets.
AA guns have done their job if they cause the attacking aircraft to drop early and miss, drop wide or attack another target altogether.