There's no regional barrel length differences, so a Prussian gun is no more likely to be shorter or longer than a Bavarian gun. 28" seems to be a good average.
I have a ca. 1830 German rifle with a 16" barrel. I have seen them shorter, but they're not common.
The really stubby barreled guns are usually referred to as "Saustützen" for hunting wild hogs in heavy cover....so they say.
The reasons for the 2-3' long "short" barrels would be that rifles were probably as often as not used for target shooting. Target shooting was THE sport in 18th century Germany, and it seems everyone was involved. German rifles (usually) are marvelously designed ergonomic shooting machines. They balance perfectly just in front of the lock. Longer rifle barrels push that balance point way further forward...not to mention the fact that they are simply heavier! Also, remember the tradition in German rifles, where previously, wheel lock rifles had a cheek stock, no butt to put to your shoulder, so it would be rather difficult to hold a rifle with a long heavy barrel without benefit of a butt to put to the shoulder!
There are longer barreled German rifles. Some are "Vogel Pirsch Büchsen" (bird stalking rifles),and are small caliber. These are fairly uncommon. Then there are heavy bench rest rifles, which are fairly common, and will have stout barrels 40+ inches in length.