Granted Google could probably lean on them a little harder to stop doing that.
Moreover, Apple does the same thing. They might give you longer than HTC, but they still stop issuing updates to perfectly operational devices, and don't publish the documentation necessary for anybody else to make an OS for them.
Compare this to PCs where you can still install the latest Windows or Linux on some piece of hardware that originally shipped with a CRT monitor and whose manufacturer went out of business a decade ago.