Here's why:
* Simile: A figure of speech that compares two things using the words "like" or "as".
* Your example: "warily as if approaching a snoozing lion" uses the word "as if" to compare the way someone is approaching something to the way one would approach a sleeping lion.
Therefore, it fits the definition of a simile.