You may very well declare a war that you don't expect to win if you have even worse expectations for a future war. This was pretty much the situation of Germany in WW1, from my understanding.
Unfortunately for the junta, they weren't the only unpopular right-wing government who saw warfare and jingoism as a handy distraction from internal economic and social problems.
Those are the kinds of things you say that already imply 100s of other theories and assumption and then you are like 'We have no choice'.
Germany was in a fantastic geopolitical situation after Bismark but then just fucked it all up because they had all these wrong (and sometimes crazy) assumptions.