I think it is astute to look at things in these terms, and avoid the lazy but quite common exercise of labeling motivations and actions you don't understand as "not understandable."

George Kennan, who came up in a recent HN post [0], has a fair bit to say on the subject. Namely, that throughout its history, Russia has been obsessed with expanding and securing its border for perfectly understandable strategic reasons. Especially regarding Ukraine and Crimea. Something along the lines of their western borders being completely open and strategically terrible to defend, thus the desire to push them out to more defensible locations. Of course you also have key routes for shipping, military bases, and oil flow in Ukraine that make it an incredibly appealing strategic objective. Kennan actually defined this mentality of western territorial expansion as an essential part of the Russian character, that it should be used as a backdrop to inform analysis of Russia 's motivations and contextualize strategic decisions (this was a key part of his analysis that ultimately lead to the whole "containment" strategy in the cold war).

It seems as though Western expansion has become completely ingrained basically to the point of a cultural imperative for any aspiring politician or political operator in Russia. Kind of like the requirement that any US politician must publicly proclaim their love of freedom and God in more or less equal measure (from what I can gather we've had exactly two openly atheist congress members, out of >11,000 members throughout history). In this way, it doesn't necessarily have to be rational in any absolute sense, it is rational in terms of national politics, beyond the point of expediency and into the territory of a binary whether or not you fit the hard requirements.

In 1992, Kennan wrote that NATO expansion towards former Soviet states in Western Europe including Ukraine, “ would be the most fateful error of American policy in the entire post-cold-war era...
Such a decision may be expected to inflame the nationalistic, anti-Western and militaristic tendencies in Russian opinion; to have an adverse effect on the development of Russian democracy; to restore the atmosphere of the cold war to East-West relations; and to impel Russian foreign policy in directions decidedly not to our liking.”

He seems to have been largely ignored, not for the first in his career, up until Putin lead Russia to the annexation of Crimea. An act which seems to have taken heads of state and the international relations people by surprise, and perhaps undermined their optimistic beliefs about Putin having been coaxed into political/military partnership with the Western world (through economic incentives, international relations norms, etc). There was a lot of stock put on this idea that through economic incentives, trade agreements, and such, both Russia and China could be "brought into the fold" of neoliberalism and Western democratic principles. People were quite shocked to find out it didn't play out like a Disney movie with regards to Putin, and it's looking more and more like China isn't going to continue playing along with the tune set by the West when it is no longer in their strategic interest to do so.

Everyone from Obama to John Kerry to Angela Merkel were so perplexed over Russia's move in 2014 that their only explanations (including to each other in private, apparently) revolved around Putin being divorced from reality. However, as Henry Kissinger noted, the demonization of Putin is a stand-in for foreign policy analysis when there is nothing better at hand to guide us. So perhaps it is our lack of understanding of his real situation and objectives rather than his (of what is in both his and Russia's strategic interest) that is driving this urge to paint him as a irrational lunatic.

It seems likely that, as Kennan predicted, NATO expansion and general American/European policy caused a return of cold-war thinking and relations.. but only in the mind of Putin and Russian politicians. The rest of the world was out of step, and apparently wouldn't realize their error and catch up to reality until after that key moment in 2022, when just about everyone except US intelligence agencies didn't really believe the invasion was going to happen.

[0] - https://news.ycombinator.com/item?id=37374013