The heat source of the network is gas or various oil fuels, so it makes sense that it's cheaper to do it yourself - gas infrastructure is very optimised, and there are very little network losses in comparison. I think it only makes sense if the network has a cheap energy source, for example by using waste energy from industrial processes or utility-scale geothermal.