Here's why:
* Adjectives modify nouns. In this case, "tattered" describes the state of something that is being "in" something else. For example: "The old book was tattered in the corner."
* "In" is a preposition that indicates location or state.
Therefore, "tattered" functions as an adjective modifying the noun (implied) that is "in" something.