Wow. I logged in for the first time in, like, years, just to answer this.
As far as I know, there are exactly 2 (two) phones that run Android that receive Android updates immediately - they are the Google Pixel and Google Pixel XL. Go figure.
Now, why is this?
Wireless carriers (again, here is that as far as I know qualifier) that carries Android phones load their own customized version of of the Android OS onto those phones. That means that the same wireless carrier must also customize each Android update. This is very time consuming, annoying, and frankly, costly. There is basically no return on investment for wireless carriers to support further updates.
The same can be said for mobile manufacturers. For example, I have a Samsung Galaxy Note tablet. I love it. It does not have the capability to connect to a cell network, it is wifi only. Now, there is no wireless carrier involved here, right? Right! However, now the manufacturer of the mobile device has to support these updates, because manufacturers also use their own customized Android versions. But I'm not paying a subscription to Samsung. They are literally making zero money off of me once I buy that tablet. So manufacturers also have little to no return on investment (and therefore incentive) to push out their custom versions of Android as well.
Another point: Every different mobile device running android has to run a different version per phone. This isn't a manufacturer or wireless carrier being a dick, it's just the way things are and need to be, and is required because phones have different hardware. So, even if the manufacturer/wireless carrier isn't running their own customized version of Android, each model of device still needs it's own version of stock Android. And now we go back to that ROI things that manufacturers feel there is little of.
So, why are Google phones different? Because Google mandates that their phones run STOCK Android! And there are only 2, with very similar hardware. This makes it much easier for Google to support their phones with updated versions of Android.
Now, your next question should be "Well, how do I run an updated version of Android??"
The solution is that you must run an 'after-market' (that's the wrong term, but the meaning is analogous) version of Android such as CyanogenMod. There are also other versions/communities, but I'm not familiar with those. Many of these communities have guides on how to install and run Android on your phone.
There is something to be aware of here. As I said above, every phone requires a different compilation of the OS. So many sure you choose the right version for your phone, and the right install guide for your phone.
EDIT: forgot a letter in a word