Subject to the same deterioration that effects the wooden structure, the metal oxidizes, rusts away or simply wears down from use.
In the case of this pair of locks the bit on the key supplied with the credenza was too short to through the bolt and one of the locks was missing the bolt entirely.
The locks themselves are from a 20th century reproduction but the mechanics and parts are essentially the same as those in a period mortise lock.
First stop - the metal scrap bin.
I collect bits of useable metal scrap left over from projects or salvaged as I find it.
To make the replacement bolt for the lock I needed some 1/8" thick mild steel.
Having found none in my "collection" I opted to make the missing parts in brass.
Making the Bolt
The brass stock was heated to remove its temper making it soft(er) and easier to shape. The remaining original bolt was removed and used as a template which I scribed around.
The shape was then cut out with a jewelers saw and finished up with needle files.
Since the section of the bolt which extends out of the throat to engage the keeper is thicker than the internal plate, I cleaned the surfaces and brazed on enough material to make up the difference.
The finished locks with the parts in place
The Key
The bit on the supplied key was too short to engage the bolt and was therefore used to pull open the doors without actually locking or unlocking the piece.
As you can see in this photo the bit was short by about 1/8".
In order to correct the problem a small piece of brass was brazed onto the end of the bit and then filed to mate properly with the bolt.
Additional Information
I found this article explains a lot of the terminology and history
The Keys to Antique Furniture Locks by Fred Taylor
Additional Photos on Flickr