They had walls around it. They just weren't tall enough. I'm not sure rasing the whole fundation is the way to go. It might even be useful for the reactors to be bellow sea level.
Exactly: all around the east coast of Japan there are rather high walls to protect the land from tsunamis.
In the areas with most high density of population Japan built walls as high as 4.5 meters, designed to redirect water in the event of a tsunami facilitating floodgates and channel.
The walls systems actually worked to some extent: it did not stop completely the tsunami but gave people some extra precious time to evacuate.
Without them the death toll would have been much higher.
The nuclear plant was protected by even higher walls than in normal places, and based on a raised foundation.
Unfortunately the wave was even higher then the walls and went over the protection wall.
The plant itself was secure, but auxiliary support units were not and got destroyed.
One of these auxiliary units was the electric generator to power the pumps to cool down the reactor in case of emergency.
In a complex system it's easy to have unseen weak points, and however small they are they can cause huge problems.
We tend to forget that buildings and plants built to withstand earthquakes and tsunami do so only until a certain point (e.g. the wall protecting the nuclear plan was not designed to stop waves taller than 10 meters).
The planet can always throw at us even bigger catastrophes.
In short, the lesson we can take is that we always have to think about contingency plans in case our main "defenses" may get overwhelmed.