Gregory J. Liebau wrote: |
Two words: discipline and organization. The Swiss confederacy was comprised of a tightly knit and homogenous urban society, and for well over a hundred years prior to the period of their military fame, the Swiss towns had been defending themselves against incursions from foreign powers (such as the Holy Roman Empire) attempting to relieve them of their urban privileges. |
The HRE was less of a "foreign" power than one the Swiss emancipated themselves from. And their conflict as such was less with the HRE, which had granted them imperial immediacy, than with the Habsburgs who, as local nobility, they feared were far less concerned with the interest of the Empire as such than with their own influence in the region. In fact, the privileges had been expanded to Unterwalden by the Luxembourg emperors. And when the Bavarian Louis and the Austrian (Habsburg) Frederick vied for the throne, the confederacy supported the Bavarian in order to curb Habsburg power. So they very much saw themselves as part of the HRE, if as a part immediately subordinate to the Emperor, whoever that was, and for reasons of pure power politics not preferring the Emperor to come from local nobility such as the Habsburgs, fearing that the conflict of interest would lead to their rights curbed in favor of the noble house.
So if anything, the Swiss built their strength and experience in a local conflict with the House of Habsburgs. It is also erroneous to say that they turned their interest from purely defensive to expansionist in the 15th century - their expansion started long before that and partly drove the conflict with the Habsburgs, who, in turn, wanted to reassert their authority. Both the Battle of Morgarten and the Battle of Sempach happened in an effort at retaliation against Confederacy aggression and expansion.