The city was a military device as much as a provincial capital: Vauban's citadel, arsenal, bridges over the Rhine, depots. Under the Ancien Régime Kellermann had been its governor in 1788. Any army meaning to act in southern Germany begins with Strasbourg, and any army coming from Germany runs into it.
The great moment was September 1805. The camp of Boulogne was struck in three weeks and the Grande Armée crossed France in separate corps; it passed the Rhine at Strasbourg and downstream between 25 September and 1 October. A month later Mack capitulated at Ulm without a pitched battle: marching had done more than fire.
Joséphine stayed there during the campaign, at the Palais Rohan, holding a waiting court while the army went down the Danube. The city also served as a postal relay and courier crossing: in an empire governed on horseback, Strasbourg was a node of information as much as of troops.
In 1814 the logic reversed. Blockaded by the allies, the fortress held until the abdication; in 1815 it was besieged again after Waterloo. A frontier city, it served every regime in turn — and kept from the Empire its arsenal, its barracks and the memory of armies passing through.