Sure, but if you build a nuclear reactor suitably close to your city (!) it produces hot water directly in addition to electricity. It's just a much bigger pain to ship hot water over long distances than electricity.
(It didn't last very long and was shut down in the mid 1970's, for somewhat obvious reasons.)
[0]: https://en.wikipedia.org/wiki/%C3%85gesta_Nuclear_Plant