I'm fundamentally opposed to carpeting on boats for a number of reasons, two in particular. One, unless done right, and it often is not, it impedes access to deck hatches and bilges/machinery beneath. Two, spills on boats, from red wine to used oil, are a fact of life, carpet makes clean ups a pain.
I feel strongly enough about this to have memorialized it in an editorial a little over a year ago...
https://stevedmarineconsulting.com/a-boat-buyers-top-ten-guide-to-a-pre-offer-evaluation-part-i/
Rugs on the other hand are great, they are easily replaced.
A few years ago a colleague ran a wire through a boat to test a defective wire run, his intention being to replace the non-working wire with one simply laid across the sole, simply as a test. When he applied power, the wire quickly overheated and parted thanks to a short in the circuit (he did not install a fuse for the test), but before the circuit was broken it left scorch marks in about 25 feet of carpeting, which had to be replaced.