I don't know if this is the reason, but one potential advantage of tank water heaters is the ability to use off-peak power. This can be a big cost advantage, and even if it's less energy efficient it can theoretically be better for the environment by allowing water heaters to act as distributed renewable energy storage. At the moment, though, the efficiency savings probably make tankless water heaters a bit more environmentally friendly.