Can a wheel cylinder explode?

I have a 2001 Ford Focus with rear drums. Last month I had Midas replace the passenger rear drum because I needed the bearing changed, they only changed the drum no shoes or cylinder. Today, I was driving making a left turn at a light when all of a sudden a loud bang from that drum happened. Sounded like a gunshot in my trunk. It leaked out all my brake fluid and the fluid was smoking. I got home but the pedal would go all the way to the floor. Can a cylinder explode? And if so is it a safe bet to say that something Midas did messed this up?

Nothing midas did
if they did something wrong, you would not have had brakes when you left the shop

I'm not understanding why the drum needed replacing.

It didn't explode in the common definition of the term. The wheel cylinder piston just blew out. When they replaced the drum, I suspect they didn't do something they should have done when they did the work (like reinstalling the brake components correctly). Some cars (probably most cars with drum brakes) require the brake parts to be removed to get access to the wheel bearing. The fluid was smoking because applying the brakes generates lots of heat.