Back when crushable foam helmets first came out, there was just an elastic cover wrapped around a foam helmet. The effect of the helmet impact was that it always broke apart; the helmet cover just kept the pieces together after impact.
Most helmets now have a plastic skin over the foam which provides some structural integrity while the foam is being crushed [1]. But you are correct, the helmet only works because the kinetic energy is being absorbed by a material whose composition (closed cells) will naturally break apart into smaller pieces when enough kinetic energy is applied.
About ~20 years ago I had a nasty accident that left my helmet as a cover containing small chunks of foam - given I was knocked out in the process I hate to think what would have happened if I hadn't been wearing a helmet.
[NB Accident was completely self inflicted on a forest track]
Similar - two years ago, caught the edge of a gravel track going downhill, tried to steer out of it; woke up in the middle of the road with not-quite two piece helmet but no lasting damage (except a twingy knee).
I was bombing down a track in the twilight, didn't see a gate that was basically a single post across the road until the last minute, jammed on my brakes and bike fell sideways, I skidded along on my side (still attached to bike by SPDs) and my head hit one of the gate posts.
I was out for quite bit, woke up cold and with trousers shredded on left side. Was in a lot of pain for a couple of days and ended up with a spectacular giant hematoma on my left hip.
My first reaction on coming round after being knocked out was, of course, "I hope nobody saw that" :-)
Edit: I kept the helmet (or remains of the helmet) for years to show other people.
Hah, my first reaction was "damn, we don't have cameras!" - I wanted to see just how quick things happened and what I could/should have done differently.
Otherwise basically the same for me (I'm told) - bike slammed over onto the right, walloped me into the road, and then skidded along the ground with me still attached and out cold. Knee and right shoulder blade were skinned but that was it.
I didn't have time to react to get my shoes unclipped - SPD pedals are actually very easy to unclip from. I don't think it would have made any difference if I had unclipped - I was still going to be in trouble one way or another...
NB The accident was completely my own fault (tired, went cycling after a 250 mile drive, getting dark, out alone...)
Most helmets now have a plastic skin over the foam which provides some structural integrity while the foam is being crushed [1]. But you are correct, the helmet only works because the kinetic energy is being absorbed by a material whose composition (closed cells) will naturally break apart into smaller pieces when enough kinetic energy is applied.
[1] http://www.bhsi.org/general.htm