Cats are only considered partially domesticated, and they basically domesticated themselves. They naturally decided to live near human settlements to prey on mice/etc that went after people's grain.
In comparison, dogs are conaidered fully domesticated, and we're domesticated by humans.