That’s part of Hashem’s plan for them – that’s how He created nature. The animal’s purpose is to live in the wild and eat other animals and be eaten by them.
Not every animal kills for survival. There are animals that are herbivorous and other that only eat dead animals such as vultures and buzzards. That being said animals bought or raised as pets should not be let out into the wild as they can’t survive on their own.