The great thing about buying a Google device is the software support. You get new version of Android first, you get monthly security updates without fail, and Google guarantees at least two years of OS update support and three years of security update support. The older Nexus 5X and 6P even got two extra months of security updates!
Things with the Pixel 2 and Pixel 2 XL will be different, but for the better. Google has specified that the two devices will get at least three years of both OS and security updates. The devices might even see Android R!
It’s impressive that Google is supporting these devices for so long when other manufacturers can’t even get a security update out every few months. It’s just another reason to buy a Pixel device if you don’t upgrade your phone every year.