Tectonic plate edges are not smooth. At transform boundaries, plates move against each other, but since the plates aren't smooth, lockups form. Stress is built up as both sides continue to steadily push against each other until there is sudden movement, where both plates quickly slide until they lock up again. This is what causes earthquakes.