You can be "in" something without all of you being completely inside it.
(In the context of this question, that sounds a bit wrong, but to be clear I'm talking about the pants.)
"Go in that drawer and get me the scissors." This doesn't mean that the drawer is the size of a room. It means you're putting your hand in there. Your hand is in the drawer, so you can say that you are in the drawer. Same with the pants.
"He got into my safe and took my money." Again, this doesn't mean that the safe is the size of a room. Same with the pants.
It's a figure of speech and shouldn't be taken literally. Even if you do take it literally, "in" or "into" doesn't always literally mean that you're completely inside something.