There was no advance notice of an antisatellite weapons test.
There was advance notice of a rocket launch ("Notice to Airmen" (NOTAM) from the Russian government -- hazards to airplanes), but nothing about orbital hazards.
Well the knew there was a non-zero risk of space debris. But were they expecting the Russian government to deliberately endanger even their own cosmonauts as part of a weapons test? Probably not.
They had to have known a years long debris cloud would be the result of the test. Also, I don't think a nation on earth ever doubted Russia could shoot down a satellite. The whole thing is baffling. Maybe someone got drunk and just hit the button / gave the order?
Why does Russia need an excuse to build a new space station? And how would “accidentally” destroying their existing space station bolster Putin’s arguments for allocating more civilian space spending? If they want to fund Roscosmos nothing is stopping them.
Russia is in no position to have any serious arms/space race with neither US nor China. Its a poor utterly corrupt country, living just from its natural resources.
Sure they could muster some messy space program, at the expense of everything else that is still semi-working in Russia including army/navy. It would be tremendously over budget, way too late and still hopelessly behind the other two. What greatness Soviet union had in space is long gone, smart folks now rather work for 10x more or simply moved to places like US or Switzerland (I sure see tons of them here in Geneva, nobody wanting to go back).
If I should speculate, this was a desperate attempt to asses / show some power in the space age, when Russia is being made obsolete in it fast. Its actually not that surprising given typical russian mentality. Its irrational, outright stupid move.