These earthquakes occur due to the movement of magma within the volcano, which can cause fractures in the surrounding rock.