Why do most earthquakes occur near tectonic plates?

The entire crust of the earth is tectonic plates!

Perhaps you meant "Why most earthquakes occur near the boundaries of tectonic plates?". This is because the tectonic plates move relative to each other at their boundaries, this relative movement causes many of the earthquakes that occur. In the centers of tectonic plates there is little relative movement and thus fewer earthquakes.