It makes a lot of sense when there is waste heat.
But in places where there isn't, having per house or per apartment block heating unit is preferable because you cut on transmission losses and infrastructure cost
Also gas pipes to every home isn't a thing in many countries.