I think we've been overlooking another factor, too - with gas, there's just more energy available. Getting back to your point about thermodynamics, gas systems are losing some energy to exhaust heat, but there's so much more energy available to start with that it doesn't matter. If you try and do instant hot with electric, you need something like 24,000 watts just to get 2.5gpm. To get a usable system for a typical house, that might mean 200a just dedicated to making hot water. Meanwhile, it's nothing to get a few hundred thousand BTU out of your gas line.