I read that doors used to have very long nails in them to make them stronger. In order to keep the nails from falling out, they would hit the end sticking out on the other side so it would be bent down.
This made the nail unusable later, or "dead" giving the phrase "dead as a door nail" to mean something that is really dead.