It doesn't require much study of that part of Europe's history to understand and fully agree that joining NATO is a precondition for any kind of long term national security for these countries. When things get existential, you will cut any corner you can.