Sony hasn't always been the best at updating its phones, but the company does have a commitment to AOSP unlike most others. It contributes a lot of code to Android, and developers are encouraged to tinker with unlocked devices. In fact, Sony has just announced support for AOSP on the Xperia E3 and Xperia T3, meaning all Qualcomm-based phones from 2014 can run pure Android with very little hassle.
This is all part of Sony Mobile's open device project. They don't provide stock Android ROMs, but instead post the hardware binaries for devices. Without these drivers, it's tough to roll your own build of Android. The drivers are designed for KitKat or Lollipop (depending on device) and Sony does provide instructions on building Android from AOSP. This is obviously a developer-oriented thing.
So the supported devices at this time include the Xperia E3, T3, T2 Ultra, Z3, M2, Z3 Compact, and more. You need to unlock the bootloader to flash non-standard Android builds, and of course, there's no warranty when you do that.