Yet another reason for the long barrels: As mentioned above, the European military traditions dating from the days of the Brown Bess and earlier. The old muskets were muzzleloaders, made to be loaded by standing soldiers. Long barrreled muzzleloaders are at a convenient height to load while standing erect. I suspect a lot of the reason for continuing to make 'em that way was that "that's the way we've always done it." In WWI the long rifles were found to be awkward in trench warfare. Short rifles became all the rage after WWI. If it weren't for trenches, increasing use of motorized troop transport would've encouraged shortening of rifles. As for bayonets, most countries with long rifles started shortening their bayonets in the 20th century. Shorter rifles could be given longer bayonets to equalize their reach. The Czechs are a good example, with a relatively short bayonet for the 98/22, and a considerably longer one for the Vz.24 giving a similar overall length with the bayonet fixed.