Keys usually break because of accumulated stress. A worn key, a cylinder that has become stiff, a door that must be pushed or lifted before the lock will turn, and the habit of using the key as a handle to pull the door all add strain. Duplicate keys cut from worn originals, or on thin blanks, are more likely to fail.
A key that breaks while turning often points to a problem the key was compensating for. The cylinder may need service, or the bolt may be binding against the strike because the door has shifted. A bolt binding against a shifted strike is the same fault behind a stuck deadbolt, and it is corrected through door latch and strike plate repair rather than a new lock.
If extraction restores entry but the lock was already hard to operate, a follow-up repair avoids breaking the next key.