It loosens up the membrane structure. At high temperatures the lipids in the membranes become more fluid (think butter on a hot day) and this makes the entire membrane less stable. In turn, this is quite dangerous to the cell, which is why you need to return them to an ice bath immediately after the heat shock.