That's the general rule however, sometimes I wonder if it was put in place by helmet manufacturers.....
I have several old helmets, and a couple of friends still do as well.
Some helmets hold up very well, and others don't last nearly as long.
I have a Shoei that is from '99 or 2k, and the foam in it started discintegrating a couple years ago.
I have another Shoei that has to be about 30-35 years old now, and it's foam is perfect, but the clothe on the top center needs reglued.
I have a Bell MX from 1996, and the padding is pretty flat, but the entire helmet seems unchanged.
All of the helmets were always kept indoors, climate controlled, and kept clean.
I also wouldn't want to have to wear any of them anymore, lol
I don't know if the styrofoam in them actually does degrade over time, but I'm sure it's possible.
I base this off of years of research
(watching the same old styrofoam coolers lay in the woods by the 4wheeler and truck trails, for years, unchanged. We picked up other trash but not those, this was the 80's and 90's...we wanted to see if the hype was real, that styrofoam is pretty hard to get rid of...and it is).
I would agree that helmet makers probably came up with the 5 year standard...or that's the best deal that their lobbyists could get them, lol, and that it's probably a bit conservative in most cases, but sometimes you could wear out a helmet sooner, more so in the liner and a good fit, with daily riding in all weather.
I tend to replace my helmets around the 5 year mark anyway, it's a good enough reason/excuse to get a new helmet, why not, lol