This note was written as a web page. If you're reading it on a web page, you're reading it on a computer. I'd like you to stop for a moment and think about that computer. When it arrived from its maker - possibly when you bought it - it was packed in a strong cardboard box. Inside the strong cardboard box was almost certainly some polystyrene foam packaging material. Probably at least 40mm of it, surrounding and protecting your computer from the inevitable bumps it would incur in transit - bumps like being dropped from someone's hands onto the warehouse floor, or thumped up against another, similarly packaged computer.
By and large, for these sort of bumps, the packaging works, and your computer probably arrived home safe and sound.
Now think about your bicycle helmet. Like the packaging your computer came in, it is worn to protect a very valuable object - your brain. Like the packaging your computer came in, it is made of polystyrene foam - and typically it's a good bit less than 40mm thick.
I would like you to stop again, and think about the box your computer came in. I'd like you, as a thought experiment, to imagine taking your computer, putting it back it in its original box, and placing the box in the middle of the street. Now I want you to imagine getting into a car and driving into the box at just thirty miles an hour. You've imagined that? Good. Now do you think you would be able to use the computer afterwards?
Polystyrene foam is just polystyrene foam. Polystyrene foam is a light, weak, compressible solid which rapidly becomes brittle with age and is easily damaged by solvents. It doesn't become magically stronger just because it's formed into a cycle helmet. The same foam that didn't protect the computer in the thought experiment is equally not going to protect your head in similar circumstances.