Dunno about the others, but several large metropolitan governments in Germany have switched to Linux because of the price, security, and customability of the OS when compared to Windows.
That could well be the trigger. Often companies are afraid to switch to Linux because they exchange files with their customers, who have windows. In reality, most Linux people have software (e.g. OpenOffice) that can read and write MS Office files with ease. But the fear of having a customer say “I can’t read your file” often acts as a deterrent.
If your customers switch to Linux, you’re more likely to do the same. Lots of companies do business with government agencies, so the change propagates outward.
The success of Commodore Amiga and Atari ST in 1980s Germany as I recollect was mostly due to these systems being affordable for various uses when Microsoft/Intel boxes were not. You could run a graphical/windows OS with good word processing software on an Atari ST, with a very good b/w monitor, at a time when word processing on a Microsoft/Intel machine involved blurry text-mode displays and printers and was more expensive to boot. For some years DTP was also better value for money on Atari ST.
Commodore Amigas were the perfect affordable machine for home use. I even saw them in East German homes prior to reunification - people could scrape enough Western currency together for that; couldn’t hope to afford a 80386 machine.
As for today’s popularity of Linux, an anti-big-corporation animus might play a role with private individuals, companies don’t want to lock themselves into the future descisions of a single corporation, and for government the above plus a distrust of possible backdoors in the closed-source software of a foreign company (from a country with a voracious appetite for intelligence). Also Microsoft hasn’t succeeded to get into bed with the German federal government the way it seems to have with the US federal government, due to a) the largest part of its products’ value being added in the US, b) a party-finance system that’s IMO less amenable to corporate influence than the US one.