engine blown after repair of cooling system on 2000 BMW 528i

My cooling system was not working my car overheated aand I brought it in to have water pump and thermostat installed. I got the car back after these items were replaced and drove it 188 miles, the next day it then overheated again and the engine is now shot. the mecahnic said the block and head are cracked. the car ran when fine (other than overheating) when it was brought in for repair. what would be the most likely reason it overheated and cracked the block and head gasket.

Asked by for the 2000 BMW 528i
The initial overheat likely caused the damage, and why it overheated the first time may have been from the water pump. What was the reason they replaced the water pump and thermostat?
The only issue I see here is that the shop that replaced the water pump didn't check to make sure that there wasn't further damage at that time. Did the shop check to see if the head gasket was blown? If not, ask them why not?