Personally, after witnessing several dogs and cats aboard the many, many boats here in Boot Key Harbor, I sincerely believe it is cruel and unusual punishment for the pet. The dogs, some left aboard by their owners during the day while the captain is somewhere ashore, are forced to withhold their bodily excretions for endless hours until their owner returns.
The two boats I was invited aboard smelled a lot like the vet's office I remembered back home - overwhelmed with rancid odors that were trying to be covered up with a variety of fragrances emitted from spray cans and wicks.
If you want a pet, get an aquarium. Better yet, find a bevy of young ladies to accompany you on your voyages. They smell better, look better, etc...,etc...etc...