I'd actually say it is much more prudent to shore up your defenses BEFORE you need it, not after. Playing catch up is hard to do when the tanks start rolling in.
Last few decades have been 'relatively' peaceful for many parts of Europe, but given the almost 2 thousand year history of on and off warfare in Europe, nobody should have been surprised for the need for a country to defend itself or its neighbors.
What is 'simple' is assuming that because it is peaceful today, it will always be peaceful.
Your comment is overly simplistic as it ignores a ton of the signals that nations and leaders emit by doing one thing or the other.
Think of the nuclear treaties: they're here to limit the spread of nuclear weapons, actually adding to the global security.
Si, yes, not beefing up your military can be beneficial to everyone.
Sure but, you can't change past. So NOW, is the best option left on the table.
This needs to be balanced against the public opinion, which is not (AFAIK) very favourable to war-related business in Germany. It is also complicated by the fact that nobody knows when they will be needed, so war spending can be practically increased as a matter of principle, not because war is expected in X years; this makes it more difficult to accept.
No one can change the past, so shoring up defenses now is better than waiting until later, especially when the need might be more acute and it is actually too late.
Moreover, everything seems obvious afterwards. But what if Putin had not started rampaging? The opportunity cost of spending 100B on defense if it wasn't needed, is huge. Integrated over decades, that sort of money is (part of) the difference between having a German economy and a Russian economy.
Also, investments age. It may make sense to make upgrades only when you need them.
Those are all maybes. I don't have the answer. But I think it'd good to have in mind that the world is more complex than that.