The ship’s cat has been a common feature on many trading, exploration, and naval ships dating to ancient times.
Cats have been carried on ships for many reasons, most importantly to control rodents. Vermin aboard a ship can cause damage to ropes, woodwork, and more recently, electrical wiring. In addition, rodents threaten ships’ stores, devour crews’ foodstuff, and can cause economic damage to ships’ cargo, such as grain.
They are also a source of disease, which is dangerous for ships that are at sea for long periods of time. Rat fleas are carriers of plague, and rats on ships were believed to be a primary vector of the Black Death.
Cats naturally attack and kill rodents and quickly adapt to new surroundings, which makes them suitable for service on a ship.
In addition, they offer companionship and a sense of home, security and camaraderie to sailors away from home.
Read more on Wikipedia