In late 1944, Hitler formed the Volkssturm, a last ditch Home Guard type force to throw against the encroaching American and Russian forces at the German border. Small arms production was taxed already from the massive losses Germany had suffered on both fronts, and arming this new force was a bit of a problem. Most of the Volkssturm were in fact armed with captured weapons, including large numbers of Italian Carcano rifles. However, in typical German fashion an R&D program was devised to create a new-production weapon just for these units.
A large number of prototypes were developed in both 7.92×57 and 7.92×33 calibers, but the general preference was for 8×57, to maintain ammunition commonality with the other elements of the military. Walther designed a very simple magazine fed, bolt action design which was accepted and put into production in December 1944. Production was intended to be spread among small shops nationwide, so as not to impede other arms production at the major industrial concerns. The biggest obstacle to this plan was barrel manufacture, which is significantly more complex than could be handled by the typical small machine shop. So instead of new barrels, it was decided to make use of existing stocks of Luftwaffe MG15, MG17, and MG81 barrels, turned down to fit the VG1 receivers. As a result, a variety of barrel lengths and profiles are to be found on VG1 rifles.
You can find more details on the construction of the VG1 on the Walther VG1 page in the Vault, along with a gallery of detailed photographs. But one other element of interest (to me anyway), is the use of standard K43 magazines for the weapon. This seemed like (and was) a reasonable way to expedite production by using available designs. However, it had the unintended consequence of placing a serious stress of the manufacture of those magazines. Soldiers issued K43 rifles were initially given three magazines, but the Volksgewehr programs forced that number be reduced to 2 and eventually just 1 as magazines were siphoned off to Volkssturm units.