It's alarming and irresponsible for any country to perform an anti-satellite missile test but there is a level of hypocrisy from the countries condemning - some of whom have also conducted such tests in the past; China as recently as 2007, the US has done so a number of times historically and as recently as 2008 and India most recently in 2019.
Sources:
https://en.wikipedia.org/wiki/Anti-satellite_weapon
https://en.wikipedia.org/wiki/2007_Chinese_anti-satellite_mi...