Because Japan has so many earthquakes, buildings must be robust to avoid collapse.
Seismic protection is also used in Japanese buildings.
The earthquake was so strong that a superhuman like baki and other people found it very difficult to keep their balance.
An earthquake with a magnitude of 5 mostly produces slight shaking, which may cause a slight disturbance in balance. However, it does not cause a serious imbalance.
I am not convinced by your argument that this earthquake was magnitude 5.