Saxony's betrayal had nothing to do with German "nationalistic pride" as such a thing did not exist. There was no notion of a German nation in the Napoleonic era. That developed later in the 19th century. The Germanic states despised each other and warred constantly. Prussia was especially known for their dislike of other Germanic states. There was Saxon nationalism, Prussian nationalism, and Bavarian, and Austrian and so forth, but few people seemed to have desired a united German nation. Von Schill tried to stir up Germanic pride and was ignored as Prussian rebel.
In short, people associated themselves with their state, not their ethnicity.
Saxony threw in her lot with France, until, at the battle of Leipzig, they realized they could get a much better deal fighting for the other side. Bavaria did the same, even though they liked Napoleon quite a bit more then they liked Austria. They did what was best for themselves. Had Leipzig been won, they would have stayed with Napoleon.
That wouldn't have done either one much good, Saxony having changed sides during the battle and Bavaria having declared war on France two days before it started. I doubt Bavaria could have passed their declaration of war off as a practical joke.