I don't know about wind, but with earthquakes the buildings have to give and sway in order to absorb the shockwaves.

Some are even built on rollers.

Building movement is sometimes the best way to deal with the elements.