Some nuclear reactions continue in spent rods of nuclear fuel, and therefore they still produce heat. They need to be cooled or otherwise they would become dangerously hot. In principle the heated water in the cooling pool could be used to produce electricity or for heating buildings, but I don’t know if that is actually done in practice. If not, then you are right that some potentially available energy is lost, but the amount of energy wasted is very small compared with what is produced in the reactors.
I think they need to be cooled because if they aren’t then the metal surrounding the fuel in the rods, would be damaged (think about what happens if you leave a hob ring on for too long, the ring would be irreversibly damaged) and then the highly radioactive fuel inside would be able to leak out, possibly in the form of radioactive gas which is difficult to control, which is really bad news in terms of radiation safety. This is what all the problems in Japan recently were all about. They needed to keep the rods cool so that there wasn’t a sever radiation leak.