The main reason is a combination of negligence by the owner of the plant and not enough enforcement of standards.
The fukushima powerplant was known to have sea wall lower then required and as such was vulnerable to a tsunami (this was known for quite a long time)
Combined with backup power in the basement (also against standards)
For an example of what happens to a reactor build according to safety requirements see the onagawa nuclear powerplant