I remember just before the war I would bid everything that Russia would in no way start the war. It just didn't make any rational sense. Who in sound mind would think to do it knowing that all the West [might/would] unite against you.
However rationality is being lost in personal agendas and Mafioso thinking of some sorts.
Now we see that after any Russian loss, be it a warship or loss of territory Russia responds with some pity attack against civilians. For example wasting expensive missiles to blow out a few floors of some high rise residential building. It is just hard to understand by rational western thinking.
However growing up in post-soviet country this kind of thinking is prominent amongst post-soviet mafias and similar sorts of groups - "if I can't have it nobody will". It is some kind of childish, failure to launch thing. "If I lost football match I will destroy the ball and that will show everybody". People grow out of it, thugs become thugs exactly for this reason - failure to grow up, lack of empathy because of family problems and etc.
Moreover you can see this in all the Russian army from the very top to the very bottom. What self respecting army would terrorize civilians after any push back. "We are retreating but we will put grenades under every pillow in every house in this village. That will show them". If this kind of thinking is prominent among all the population, all the army and etc. it starts to make more sense.
A simple "If we can't profit out of it we will blow it up and then you will know" starts to make sense.
Then you have "we can frame this on USA/Ukraine" because everybody knows "it is not in our interest".
Then you have Putin's interest - pipeline can become very profitable thing for the oligarch who gets rid of Putin and makes peace with the West. So it becomes a personal danger to Putin.
So it really could be Russia being Russia and Russian elite trying to "stay relevant" by their own (what west would call) crazy thinking.