That's for a whole unit with batteries and some other components. I'm not sure if that means that the sensor itself only lasts 5-7 years.
The common / low cost carbon monoxide detectors use a chemical reaction (either a fuel cell or one of a few reactions that produce a colour change in the presence of CO) - the chemistry degrades with time and exposure causing the sensitivity to drop off over time.
I’m not sure how much of a safety margin they have (like could it still detect dangerous levels at 2x it’s design life or something) but a quality generator would have a life of several times that of a CO sensor at least so replacement will definitely/hopefully be a design consideration.