People build and install things on boats -- and everywhere else -- for lots of reasons, not just cost-benefit. Why have an expensive trad engine when you can have a cheap secondhand modern diesel? Why pay the extra for a hull from one of the premium builders and fit it out expensively when you could get something superficially similar from a cheapo builder? Why have an inverter at all when you can make do with much less electrical "stuff" on board, if that suits your lifestyle? Why have an expensive comfy sofa or bed when you could have a much cheaper one?
A modern electrical setup with things like LFP batteries/inverter/solar/big alternator+controller/generator does cost a lot more money than a "traditional" narrowboat one with a few LA batteries, but means you can treat the mains more like in a house with whatever appliances you want -- but in the end it's a matter of convenience/preference, not absolute necessity. If you don't want to do this or can't afford it, then stick with "traditional" electrics, neither approach is "wrong" or "right".
Going the whole hog with massive LFP batteries/inverter/generator just to get rid of gas for cooking really doesn't make sense on a conventional diesel boat due to the cost; the reverse is true on an electric/hybrid (like mine) where all this exists anyway as part of the propulsion system, but there are only a tiny number of boats like this on the canals today due to the very high up-front cost... 😉