The MP 40 is one of the most recognizable weapons of World War II. The German submachine gun, made from stamped steel and used by Axis forces, looked unlike most other weapons of the conflict and could be produced relatively cheaply. It allowed German soldiers to fire hundreds of rounds per minute in a fairly controlled way.
So if the weapon was that good, why did not every German soldier carry one? The answer is that the MP 40 was a specialist tool. It is closely tied to German troops in films, games, and photographs, and it can seem as though almost everyone had one. In reality, the typical German infantryman went into battle with a Kar98k rifle.
The MP 40 was a submachine gun chambered for 9x19mm Parabellum pistol ammunition. It could fire roughly 500 rounds per minute and was especially effective at close range. That did not make it an ideal general-purpose infantry weapon.
German military doctrine initially issued submachine guns mainly to men with a special need for compact automatic fire. These included squad and group leaders, some assault troops, armored vehicle crews, paratroopers, and other specialists.
German infantry tactics of the period were built around the machine gun. An infantry squad was not designed to give every soldier enormous individual firepower. The main source of firepower was usually the general-purpose MG 34, and later the MG 42.
The machine gun gave the squad a sustained source of automatic fire. Riflemen supported it, carried ammunition, protected its flanks, and maneuvered with it. A typical squad of nine or ten men carried a mix of weapons rather than nine or ten MP 40s.

The squad leader might carry the submachine gun. The machine-gun team operated the MG 34 or MG 42. The rest of the soldiers usually carried Kar98k rifles. Giving everyone an MP 40 would not necessarily have improved that system.
The weapon also had a major weakness: range. The Kar98k fired powerful Mauser rifle ammunition, while the MP 40 fired much less powerful 9mm pistol ammunition. In close fighting, that was acceptable or even excellent.
The MP 40 could put several rounds into a target very quickly and was useful in buildings, trenches, forests, or urban combat. But across an open field at hundreds of meters, the Kar98k was far more useful.
The MP 40's practical effective range was roughly 100 to 200 meters depending on the standard used. The Kar98k could engage individual targets at much longer distances. German soldiers fought from the farms of the Soviet Union to the deserts of North Africa and the mountains of Italy. An army equipped almost entirely with short-range submachine guns would have been at a severe disadvantage in many of those environments.
Ammunition was another problem. Automatic weapons can consume ammunition very quickly. An MP 40 magazine usually held 32 rounds. A soldier firing automatically could empty it in seconds.
That created a logistical problem. Imagine replacing millions of bolt-action rifles with automatic weapons. Suddenly the army would need far larger quantities of ammunition moved from factories to depots, from depots to divisions, from divisions to regiments, and finally into the hands of the individual soldier. The soldier would then have to carry it as well.

A soldier armed with a Kar98k generally consumed ammunition much more slowly. That allowed the German army to concentrate huge quantities of ammunition on the weapon that truly needed it: the squad machine gun. This mattered enormously because the MG 34 or MG 42 could consume ammunition at an exceptional rate.
Germany also could not simply manufacture unlimited numbers of MP 40s. That was the industrial reality. Germany produced more than a million of them, along with its predecessor the MP 38, making them relatively common weapons. But Germany mobilized millions upon millions of soldiers during the war, including in different territories and countries.
Replacing every Kar98k with an MP 40 would have required manufacturing tens of millions of additional weapons, magazines, and enormous quantities of 9mm ammunition. The MP 40 was deliberately designed to be easier and cheaper to mass-produce than its older predecessor, using a large-scale structure of stamped and welded parts. Even so, every MP 40 required steel, machinery, workers, factory energy, and transport.
At the same time, Germany was also trying to manufacture tanks, aircraft, artillery, trucks, submarines, and countless other weapons, including its wild "wonder weapons." There was little reason to undertake a massive industrial program to rearm millions of infantrymen with MP 40s.
It is also worth noting that the Kar98k, the weapon most people compare with the MP 40, was not obsolete at all. We compare the two now because the Kar98k was what most infantrymen carried in their hands during World War II. One might look at a bolt-action rifle and assume the MP 40 was far superior, but that was not the case at all.
The two weapons performed different jobs. The Kar98k had longer range, greater muzzle energy, and excellent accuracy. It was also mechanically simple and relatively economical in ammunition consumption. The MP 40 provided far greater firepower at close range, but sacrificed range and ballistic performance to do so.

So the German army had sound reasons to keep its rifles. If that is true, though, why would most people name the MP 40 if asked to identify a German World War II weapon? The men most likely to be photographed carrying these weapons were prominent soldiers, such as officers, noncommissioned officers, and assault troops. Wartime propaganda and postwar popular culture reinforced that image.
A German soldier carrying an MP 40 immediately looks more distinctly German to audiences, while the Kar98k resembles many other bolt-action rifles of the period. Because of this, fictional German units are often shown with far more MP 40s than a normal historical infantry formation would have possessed.
Germany eventually recognized that there was a better compromise. The limitations of both the Kar98k and the MP 40 contributed to one of the most important infantry weapon developments of the war: the StG 44. The Germans realized that many infantry engagements took place at ranges where the immense power and long-range capability of standard rifle ammunition were not necessary, while a pistol-caliber submachine gun was too limited.
The solution was an intermediate cartridge. The StG 44 fired the 7.92x33mm Kurz round and combined selective fire with much better range and power than the MP 40. This was much closer to the weapon one would want to give every infantryman. The StG 44 helped develop the modern concept of the assault rifle.
So the limited distribution of the MP 40 was not simply because Germany could not make enough of them. More importantly, German commanders did not want every infantryman to carry one. The MP 40 was excellent at what it was designed for, compact close-range automatic fire, but it could not replace the range of a rifle or the sustained firepower of a machine gun.
The classic German infantry squad therefore relied on a mix of weapons. The Kar98k armed the majority, the MP 40 was usually carried by the squad leader, and the MG 34 or MG 42 served as the squad's main source of firepower. That mix tells us something important about German infantry doctrine. The machine gun, not the MP 40, was the weapon around which the entire German infantry squad was built.