NATO expansion was fully justified. A minority of American officials were skeptical of it because they were fearful of the Russian response, but who knows how many conflicts there would have been if those countries hadn't joined NATO while Russia was weak in the 1990s.
If the USSR hadn't collapsed all those countries would still be under Soviet occupation. If Russia were strong in the 90s, none of those countries would have obtained real independence, and if they had tried, Russian aggression would have likely followed as we saw at various points of the Eastern Bloc with Soviet invasions of Czechoslovakia and Hungary after uprisings against communist rule.
After the collapse of the USSR, it was only a matter of time before Russia rebuilt its army and strength and started to assert itself again as a regional hegemon. That has been Putin's grand project: rearming and strengthening Russia and asserting its might around the world. He has said on many occasions that he doesn't respect smaller neighbouring countries and views them as vassals.
This is why Eastern Europe rushed into NATO while they had the chance. Ukraine was left out for some reason and the result is a brutal Russian invasion in 2022.
This sentiment was
expressed clearly by Estonia's former president in 1996:
"Estonia's President Lennart Meri, has again called for a rapid integration of the Baltic states into NATO's security structure, despite Russian objections. Meri told a conference in the Germany city of Munich at the weekend that all three Baltic states need the feeling of security that NATO membership offers. He said Russia's aggressive policy in Chechnya gave reason to doubt that permanent stability would develop in Russia in the near future. 'Russia is probably the last colonial superpower,' Meri said. 'That is why the Baltic states are so interested in joining NATO.'"