There are a few reasons why your phone or tablet stops getting Android updates. One reason could be that the maker of your device's processor (e.g. Snapdragon or MediaTek) never updated the drivers for newer versions of Android. This is why no phones or tablets with the Snapdragon 800/801 chip ever officially received Android 7.0 Nougat, including the Nexus 5.
Google announced Project Treble a week ago, which aims to solve this particular problem by separating the Android OS from the 'Vendor interface' (the part with all the low-level drivers and binary blobs).Read More
The current Google Pixel/Pixel XL will support Project Treble, possibly meaning longer support was written by the awesome team at Android Police.