Similar to the DC wiring in the boat, the AC wire in the power cord has some current rating and is paired to a fuse that will blow if there is a short and protect the wire.
If you have an extension cord rated for 30 amps and plug it into a 50 amp socket with some sort of adapter, everything of course works fine but if there is a short on the other end of the extension cord, the cord wire could start on fire or melt the insulation before the fuse blew. That is why there is always a fuse when a new smaller gauge wire run is used
Uncledom, maybe you know this for home use. I think 14 gauge is rated for 20 amps and is typical for house wiring that is 20 amp fused / 15 or 20 amp sockets. However, it is very easy to buy a 16 gauge extension cord that is only rated for something like 13 amps. This sort of seems like it falls into the marginal idea category if there happened to be a short. But this would seem to be allowed by UL and NEC????