The result of battles in WWII was often decided by tank spearheads that cracked open defensive lines like a tin can. Combat against tanks was a priority and every possible asset was aimed against them, including aircraft. This in turn required effective AA guns that could follow tank units. The optimal solution was the installation of AA guns on tank chassis, as this solved the problem of giving the guns mobility on par with tanks. The Germans were some of the first to attack the problem of creating highly mobile SPAAGs. Work began in 1940 and the 2 cm Flak 38 auf (Sf) Pz.Kpfw. 38(t) Ausf. M (Sd.Kfz. 140), unofficially called Flakpanzer 38(t), was born in 1943.
Germany began building Sd.Kfz.10/4 special purpose vehicles practically from the very start of WWII. Their design was simple: a single barrel 20 mm Flak 30 AA gun was installed on a 1-ton halftrack. The Sd.Kfz.10/5 armed with a 20 mm Flak 38 AA gun was introduced in 1942. The SPAAG on the chassis of a halftrack was simple and cheap, which ensured its large numbers: over 1500 were built before 1944. However, the mobility of the halftracks (including those equipped with 37 mm and 88 mm AA guns with a heavier chassis) was limited. They were still less mobile off-road than tanks.
The case of AA guns mounted in trucks was even worse. They could only drive on roads. Large losses taken from British aircraft in North Africa in late 1941-early 1942 forced the Germans to consider upping their game when it came to SPAAGs.