Here's why:
* Idiom: A phrase with a figurative meaning that is different from the literal meaning of the words. In this case, it doesn't mean someone is literally as lifeless as a doornail; it means they are definitely dead.
* Hyperbole: An exaggeration used for emphasis. While "dead as a doornail" does emphasize the certainty of death, it's not an exaggeration in the sense of being unrealistic.
* Simile: A comparison using "like" or "as". There's no direct comparison with "like" or "as" in the phrase.
Let me know if you have any other language questions!