It's quite simple. There are such things as "acceptable price of a victory" - you can have your capital and most of your main cities burnt to ground and, say, 10 or even 30 percent of your population killed, but if you won and have acceptable peace established - you can rebuild your cities and women can born more children; and "unacceptable price of peace" - if your adversary suggest you to give up say, twenty million of Russian people and significant, strategically important territories, it means that in few more years he'll start a war and kill much more Russian people.
To lose twenty million killed and establish a good, reliable peace for next eighty years - is a better case. To lose twenty million surrendered and lose fifty more millions in next ten years (or even be totally genocided, if unlucky) - is much worse case.
That's why we prefer to prevent situations when the enemy can attack us first. There are diplomacy, there are covert operations, there are lower levels of conflicts for it. But sometimes all those things fails. And then we have no other option but to fight for our survival and then almost any price is acceptable. It doesn't mean that we don't care about our potential losses, we are not a horde of zombies or bloodthirsty goons. We are quite reasonable human beings. We do what is necessary in the face of the vital threat.