I favor Shoei helmets. The current 7 year from date of manufacture/5 year from retail sale recommendation that Shoei gives reportedly comes from the Snell Foundation but I did not personally research that. If that is true it is noteworthy that Snell prominently distances itself from industry pressures and seeks to create crash survival standards based on intelligent design and rigorous testing. I do not believe that Snell would collude with manufacturers to come up with a recommendation aimed at selling more helmets.
The limiting factor of the current life cycle may be the universal use of expanded polystyrene foam liners in mass produced helmets for the energy absorbing part of the helmet. A properly fitted helmet is tight and and just using it over time deforms the closed cell EPS liner a little and compresses the open cell foam pads used in interior padded liners a lot. A helmet in use 5 years doesn't fit like new ones do. Fit is important to absorb energy and keep it on your melon in a crash thus helmet on and off cycles matter. Hanging it on rear view mirrors or handlebar ends can make little dents in the liner which affect it.
Better EPS grades that may retain manufacture date quality longer don't absorb energy as well and can't pass various standards used to pass/fail helmets. The industry has sorted out a balance between grade and thickness of EPS that meets absorption requirements, life cycle, cost, and test results. EPS predictably degrades over time and loses ability to absorb the same level of energy during its life cycle. I theorize we could get helmets that last much longer but they wouldn't be mass produced in numbers ( read that as affordable ) and probably wouldn't be cosmetically unacceptable.
Helmets I have purchased have all had a date of manufacture either on a sticker affixed to the EPS liner or embossed on the riveted portion of the retaining strap. Not hard to find.
Finally, any life cycle recommendation is undoubtably based on worst case. How the helmet is used, how often and for how long, how it is maintained and stored between uses. Find your balance and happy place. I ride 20,000 miles a year so I wear a helmet a lot but I'm not a daily use commuter. I have more than one helmet so that reduces hours of use over 5 years. I live in a hot humid climate so that's that and I store it indoors in climate controlled conditions. A helmet I really like I'll replace the crown and cheek pads once or twice to extend quality of fit and keep it in service more than 5 years by 2 or 3 years. When I throw it away I cut the strap off and chuck it.