Earthquakes are caused when crust moves and breaks due to movement on a fault or movement on a plate boundary. Japan and China are located in areas where major tectonic plates are colliding, resulting in massive displacement of crust.
Convergent Plate Boundaries - Subduction Zones and Crustal Uplift
Convergent plate boundaries occur where two or more plates are colliding. There are two types of convergent plate boundaries. One is a subduction zone where a more dense plate is pushed under a less dense plate. This is common where one plate is an oceanic plate, and the other a continental plate. The oceanic plate, weighed down by a crust that is cold and saturated with ocean water, will sink under the lighter, dryer continental plate. The other type of convergent plate boundary is when both plates have equal density, so instead of one plate sinking below another, they both fold and buckle where they meet, causing crustal uplift. This is common where both plates are continental plates.
Japan is located immediately to the west of a major subduction zone, where the water-saturated Pacific plate is sinking below the lighter North American plate at a rate of 83 mm per year. Not only does this cause major earthquakes in Japan, but water also happens to lower the melting temperature of rock. So as the water-saturated Pacific plate sinks below the North American plate into the mantle, the sinking crust melts quickly and easily, producing fluid, gas-rich magma that wants to rise through the surface. The result of this is the presence of very explosive volcanoes throughout Japan.
China, on the other hand, is located to the north east of where the Indian and Eurasian plates are colliding at a rate of 50 mm per year. Both of these plates are continental crust, therefore they are equal enough in density that one does not sink below the other. Instead the crust buckles and folds where they are colliding, resulting in crustal uplift, for example, the Himalayan Mountain Range and the Tibetan Plateau. Earthquakes in China are caused by the motion of crustal material to the east away from the uplifted Tibetan Plateau as the Indian plate pushes into the Eurasian plate. Unlike subduction zones, crustal uplift is not associated with volcanism.
Subduction Zone Earthquakes Versus Crustal Uplift Earthquakes
Earthquakes at subduction zones are the result of stress and pressure building up as the sinking crust shoves its way below the overriding crust on its way down to the mantle. For this reason, earthquakes in subduction zones generally occur at some point along the sinking crust. If the plate is sinking at a shallow angle, then earthquakes will be more shallow. If the plate is sinking at a steep angle, then the earthquakes will be deeper.
Also, earthquakes may be shallow where the plates first meet, and then get deeper along the sinking plate. So, with subduction zones, the depth of the earthquake can vary widely, but it is usually associated the location and depth of the sinking plate and usually occurs within the upper mantle or lower part of the overriding crust.
Earthquakes associated with crustal uplifts are caused by the breaking of crust due to the collision of plates. The depth of these earthquakes can vary widely as well, but they are not associated with the position or depth of any of the plates. The location of these earthquakes is usually determined by faulting that occurs in the crust as it buckles and folds. Some of these faults are very large, so when an earthquake occurs there can be a lot of seismic activity and destruction.
Source:
"Convergent Plate Boundaries", geology.com