Be careful about drawing conclusions about broader nature from the behavior of the domestic cat. The cat’s behavior is, like the dog’s, very significantly the result of human driven natural selection. In the cat’s case, humans have favored them for 1000s of years because they kill pests like rodents. That was their ancestral “job”, their role as a domesticated animal that lives in harmony with humans.
You can probably find some other animals in nature that kill for no apparent reason though. There is apparently a term for it: https://en.m.wikipedia.org/wiki/Surplus_killing (though the term confusingly conflates unnecessary killing with caching the excess for later)