Yes, fully loaded the MP 40 magazine holds 32 rounds.
Why?
I once heard someone say that German military 9mm ammunition, from the time of the Luger, was supplied in 32 round boxes. Two magazines full, and two mags worth of extra ammo.
Actually German WWI and WW2 9mm ammo was packed in 16 rd boxes. One box loads two pistol magazines (Luger or later the P38, both 8 rd). Two boxes load 1 SMG magazine (the MP38 or MP40).
Canadians during WW2 supplied China with huge amounts of 9mm ammo (headstamp '9 MM 42') in 64 rd boxes - loads 2 sten magazines (also 32 rds).