Most Reservations were established as the result of treaty arrangements. While it can be argued they lost, the treaties were peace treaties agreed to by Tribal representatives and representatives of the US Government. Often these arrangements were in lieu of armed conflict.
Not every Tribe got the same deal, not every tribe engaged the US in warfare, but the claim to that soil was established (or supposedly maintained) by treaty..