Edit - My error, sorry. In your post you did say "larger boats with inboards"... I was assuming the OP's case, who has an outboard, thus no big alternator.Thanks for the reply. I don't think the above statement is true, not for the portable generators.
Taking the Honda EU1000 as an example, its DC charging output is 8A max. If you connect the AC output to your shore power connector and use your shore power charger, you are limited to that, which is likely in the 10A to 40A output range, probably most commonly 20A or less.
Compare this to your main engine alternator which can be as much as 100A or more in bulk. Mine is typically around 85A for a house bank down to 60% or so. Spends most if its time around 50A.
Charging with the engine is much, much faster than with a portable generator.
You are of course correct.