1) NATO is defensive treaty.
1a) Per the terms of the NATO treaty, it would not do a "first strike" attack on Russia. Given the difficulty of getting all the NATO countries to do anything, this is a pretty good bet that NATO would not violate its charter. Putin gambled NATO would not do anything and, in fact, NATO has not done anything to date. Note that, while the member countries have contributed a lot of money and military equipment to Ukraine, that was done "on their own initiative" and not on behalf of NATO.
1b) There are other NATO countries that have shared borders with Russia. If Russia is truly afraid of having a shared border with NATO countries, why is Ukraine such a problem that Russia needs to invade them while the NATO countries that already have shared borders are not a bigger problem? As you mentioned, why is Ukraine such a problem but Finland is not? (A: Putin figured Ukraine was a pushover and knew Finland would not be - no NATO in that equation.)
1c) If Russia's invasion of Ukraine succeeded, they would have (another) shared border with NATO, exactly what they claim they don't want. OK, OK, a puppet state would have a shared border, but whatever.
2) Given NATO is a defensive treaty, if NATO had allowed Ukraine to join (Ukraine wanted to), NATO would be "on the hook" to defend Ukraine and would be fighting WWIII right now.
Corollary to 2) NATO is very happy to have Ukraine as a buffer between it and Russia. While NATO said "OK, but some time in the future" when Ukraine asked to join NATO, you can bet "some time" never comes. Ukraine brings a huge risk of the huge destruction and the huge expense of a full blown WWIII to NATO. Nobody in NATO was going to say "yeah, that's a good idea" to that anytime soon.
Even in his otherwise very festive speech to the German parliament in 2002, which he held in German and in which he proposed a close alliance between Europe and Russia, he could not help himself and included some out-of-place, acerbic remarks about NATO. In his subsequent speeches, this complaint only began to take more and more space.
I agree that Ukraine's NATO membership is of little strategic relevance, but it does seem as if Putin was stuck in some imaginary rivalry, maybe never getting over his KGB indoctrination, or maybe battling some kind of inferiority complex?
Russia "annexed Crimea" giving them some of those goals but they have only one way to reach it by land via a bridge and a long detour. Extending the "annexation" to the whole of south east Ukraine gives Russia two alternate land routes into Crimea and complete control over the Sea of Azov.
In my personal opinion, the invasion/annexation/war was always about Mariupol and a unbroken land corridor across the northern coast of the Sea of Azov. Everything else is a smoke screen/distraction/false pretext.
Material factors:
- Gas in Ukraine. Not only pipelines, but apparently there's plenty of reservoirs.
- Apparently there's also a pressing issue with water in Crimea.
- Industry. Ukraine retains a lot of industry and expertise from USSR, including expertise about how to build and maintain some of their nukes. Many advanced stuff was designed in Ukraine too.
- The buffer doctrine. Just put as much land between you and your potential enemies, as europe is pretty much a cone plain from Berlin to Moscow. Russia is pretty much indefensible on that regard as there are no natural accidents to help stopping enemies.
Inmaterial:
- Some shared views by the russian intelligentsia close to Putin and Putin himself, about some ehtno historical views about Russia, the Russians etc. Not clear how much this plays a role, and it's not yet clear to me what is it about, but they say it's there.
- Too many yes men around Putin. Aparently FSB and other agencies told this people what they wanted to hear. It's not clear to what extent this is common, but apparently they all believe this has a high probability of being true for at least this very issue.
Probably some other stuff I forget. They have been focusing on trying to get some sanity on TV, but without much success.
This scene in Spain is interesting as there's a retired General (Pedro Baños) who has been very hostile with this people. Before the invasion he mocked them as being NATO mouthpieces. He has a large following in Spain, so despite they try to ignore him, they get a lot of heat for it.
It turns out Crimea is quite arid. It is irrigated by a canal with water from the Dnieper river. While Russia annexed Crimea, they (Russia) did not control the canal between Crimea and the Dnieper river. Ukraine said "you took our land, but you cannot have our water" and stopped up the canal.
Google maps:
Where the canal enters Crimea: https://www.google.com/maps/@46.1475506,33.628099,3471m/data...
The canal coming out of the Dnieper river: https://www.google.com/maps/@46.7598057,33.4038598,9993m/dat...
Long explanation: https://acoup.blog/2022/02/25/miscellanea-understanding-the-...