Earlier quoted context omitted.
It happened in Germany, where he went to jail, because he regularly showed forbidden Nazi insignia as well as regularly doing the Hitler salute and shouting "Sieg Heil" - all of which is forbidden by law in Germany. Especially after he was already on probation for earlier transgressions against these laws. He did not go to jail because he "only" teached his dog (it was actually his dog) a poor taste trick.
No, it happened in Scotland where none of these excuses apply, and the guy certainly was doing it as a joke: https://en.wikipedia.org/wiki/Mark_Meechan
I was initially wrong in assuming there would have been only one knucklehead on this planet doing something so obviously stupid.
Sorry for that.
[1]: https://www.welt.de/print-welt/article266388/Angeklagt-Herrc...
[2]: https://www.stuttgarter-zeitung.de/inhalt.gerichtsurteil-in-...
Sorry for the sources being in German only.