They've been invading their neighbors for 200 years, at some point their neighbors got together and promised collective mutual defense. They can claim NATO is the bad guys, but they don't have much credibility at this stage. Stalin was claiming "capitalist encirclement" already in the late 1920s, way before NATO existed.
You know just because one side says one thing and the other says another thing, this isn't something unknowable, right? Russia complains about NATO - how many times has NATO invaded Russia? Now how many times has Russia invaded its neighbors? In just the last 10 years Russia has occupied Georgia, bombed Moldova, and invaded Ukraine. If they don't like all their neighbors joining an alliance maybe they shouldn't keep invading. Use some critical thinking dude.