Google only does it for 3 years, and that's from launch. Apple is supporting devices 5 years old.
I've been buying Google phones (Nexus/Pixel) because they do get the longest support, but I still get frustrated by the fact that if I buy one late in the cycle, I only really get 2 years of support for it.