Fun fact: The laws in question here have been pretty much unchanged in 60 years.
And Germany had 60+ years of (relative) peace. If you look at the history of Germany and western Europe, you will see that 60 years of peace is almost unheard of.
The current laws in Germany are not perfect. But they are based on the experiences we Germans made in the 100+ years leading up to the formation of our current state. Everything we learned from the horrors of the Third Reich, the deficiencies of the Weimar Republic, the imperialism of the German Empire and further back.
And the result is not perfect, but better than everything we had before.