Here's why:
* Imperative sentences give commands, requests, or instructions. They typically start with a verb and are often followed by an object.
* Declarative sentences make statements and are usually about something that happened or is happening.
In this case, the sentence is telling someone to do something (leave the keys on the counter).