That's really misleading. There are large spans of Earth's recentish (i.e. Phanerozoic) history where there are aren't significant reef building organisms at all. Furthermore, "bleaching" is very specific to today's scleractinian corals, which are not the main reef building organisms in the past. They didn't exist before the Triassic.
It's true that some mass extinctions coincide with the loss of the major reef builders at the time, but that's mostly reflective of most shallow marine life dying off. It's not necessarily causal.
There are also mass extinctions where reef builders truck right through. E.g. the K-T boundary.
Before gastropods evolved, stromatolites were significant reef builders.
In the Ordovician, tabulate corals were important reef builders, although they mostly form patch reefs. Stromatporoids (kind of a hard sponge - they're weird) were also present, and become more important as primary reef building organisms in the Devonian and Silurian.
The Mississippian and Pennsylvanian didn't have the sort of reefs we think about today. Instead there were a lot of deep water carbonate mounds with bryozoans, echinoderms (e.g crinoids and blastoids), etc.
In the Permian, bryozoans were one of key shallow water reef builders.
Modern corals arose in the Triassic, and have been important reef builders since. However, rudist bivalves were particularly dominant in the Cretaceous as large reef builders. They went extinct at the K-T boundary, but modern scleractinian corals continued more or less straight through.
It's true that some mass extinctions coincide with the loss of the major reef builders at the time, but that's mostly reflective of most shallow marine life dying off. It's not necessarily causal.
There are also mass extinctions where reef builders truck right through. E.g. the K-T boundary.