Long before cats became internet icons or household companions, they earned their place by solving a very practical problem.