Cats are a cool addition to Minecraft and make for nice pets. However, it’s more than just having a cat as a pet. They also serve an important function. Creepers are very scared of cats.
If you have enough cats around your house, then Creepers will avoid you at all costs. It’s the best way to ensure that you won’t run into any explosive surprises when doing some farming.