From the perspective of power maximizing their willingness to go to war is puzzling. But most research suggests states are not power maximizing but rather security maximizing. States don't consider their military potential in a vacuum but rather relative to other states that could disrupt their security. ( see: Collateral Damage Sino-Soviet Rivalry and the Termination of the Sino-Vietnamese Alliance)
In this regard, Russia's decision for war is very easy to understand even if it comes across as blindingly machiavellian and immoral. Even if the Russian economy is wrecked and the people of Russia are materially worse off Russia the state will be more secure with Ukraine destroyed.