They are hard to predict (just about impossible) because they occur where rocks have gotten locked together, then energy builds as plates move along a fault, then the rock suddenly snaps and releases all of that energy! It goes out as seismic waves, etc., that you didn't ask about.
It's not that we can't detect a sudden event. It's that we have absolutely no idea of how to determine exactly where and how much a fault is binding.
Take your palms and press them together very, very hard, then move them along each other with palms pressed. Sometimes they'll move, sometimes they'll skitter, sometimes they'll bind completely. Where along that plane are your hands binding/locking? Now blow that up to Earth-scale and the properties of rocks.
That's the core dilemma that we face in earthquake prediction.