Japan is situated on the joint of two major plates that shift particularly often.
The plates are the Pacific plate and the Philippine plate. When enough pressure builds there is an earthquake. Similar to how you push a couch that is stuck then it suddenly moves after a couple of seconds of being stuck this is very similar but on a larger scale.