Well, ideally nobody should have to fight, but sometimes you don't have the option of just stepping aside.
Like if you got randomly attacked by a mad person your choices would be to fight, run away, or just stand there doing nothing getting punched in the face. The latter is not a good option IMO.
When we look at Ukraine the situation isn't so dissimilar. They can let Russian soldiers kill and rape their civilians or they can fight. Running away isn't really possible. Complete surrender may well save your life but it's probs not going to work out great for you.
I think it's unlikely we'll be invaded in such a manner in the near future, but national security does rely on the ability to deter those that could otherwise be a threat. If nobody was willing to fight, the whole house of cards would come down pretty quick IMO.