Here's why:
* Imperative mood is used to give commands or instructions.
* The sentence is telling someone directly to perform an action (lock the door).
* The subject "you" is understood but not explicitly stated, which is typical of imperative sentences.