Here's why:
* It modifies verbs: "The cat is playing indoors." ("Indoors" tells us where the cat is playing)
* It can also modify adjectives or other adverbs: "It's surprisingly warm indoors." ("Indoors" modifies the adjective "warm")
While it might seem like a preposition because it indicates location, it doesn't function as a preposition on its own. You wouldn't say "I am in indoors." You would say "I am indoors."