Fact 1: tectonic plates being pushed together causes earthquakes. 
Fact 2: Most of the tectonic activity associated with plate tectonics occurs at or near plate margins.
Most earthquakes occur at or near plate margins.