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

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
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.
(1) Answer
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?