The dam wasn't engineered well enough, definitely not up to western standards.
Chernobyl is a similar situation. Anyone can build a dangerous power plant using whatever resource they want.
Safety is something you invest in. The question then becomes how expensive is safe nuclear power vs. safe hydroelectric? The biggest problem with nuclear is that "safe" nuclear power is very expensive compared to the alternatives, but if they can get costs down without sacrificing safety (or the alternatives increase in price), its a good option for us.
For e.g. launching rockets to space can still fail from times to times, despite the effort and care it takes to do it. Crashing planes also occur from times to times, despite our extensive knowledge of the field and all the effort we can put in preventing disasters.
Wouldn't it be sane to assume that nuclear power will also fail from times to times, and you can't do much about it?
https://en.wikipedia.org/wiki/Banqiao_Dam