I understand that, in the United States, adverse possession is a legal (but very rare) way to take ownership of someone else's real property against their will.
What I don't understand is how this is materially different from theft, other than that it has to take place over a period of time determined by statute, and then is recognized as legal.
Say, for example, I squat in a remote outbuilding on a large rural property, where I'm noticed by the owner at some point but neither evicted nor given permission to be there. Over the course of some period of years, I minimally maintain the outbuilding while living there, and perhaps park my car on the property near the outbuilding, and the owner sees all this from afar but thinks I'll just leave. I don't pay property taxes, I don't have an address for separate mail delivery and for whatever reason—perhaps the owner is non-confrontational to a fault—I'm left alone.
After the period of time required in my state for a claim of adverse possession, the title-holder wants to raze the outbuilding and calls the sheriff to have me evicted. I oppose the eviction on the basis of adverse possession, am able to argue my case to the court's satisfaction, and ultimately become the owner of the outbuilding and the land it's on.
What makes this different from theft?
I know that certain conditions have to be met in terms of what constitutes possession, what makes it adverse and so on. (Someone once told me in casual conversation that "you have to be paying the property taxes for them" but I think this is just one of several ways to demonstrate a de facto claim of ownership?) I'm looking for some insight into the common-law system that explains why the distinction even exists.