NATO is there as a deterrent against aggressive countries (I.e. Russia) in their intimidation and aggression and potential attack. It makes countries, like Russia, think twice about attacking a country involved in NATO. You attack one, you attack and fight all. I bet if Ukraine was part of NATO there wouldn’t be an annexation of Crimea by Russia.