Why do coral reefs only grow in warm shallow water?

r/

If there are corals that can survive in the cold and without sunlight in the deep sea, how come there aren’t coral reefs in shallow but temerate/colder waters? I know the different kinds of coral have evolved differently, but why hasn’t a coral evolved for temperate waters?