There are numerous reasons. It's basically an apple's to orange's thing (no pun intended).
1. Multiple parties involved; the software maker (Google), numerous device manufacturers (ex. HTC, Motorola, Samsung, etc.) and numerous cell carriers (ex. AT&T, Sprint, T-Mobile, Verizon). All have a part to play in the software updates a device may receive.
2. Vast amount of different hardware in the ecosystem. Provides variety, but makes it more difficult to keep them all updated on the same software. Also many older devices don't always have the specs to run newer software.
3. Many device manufacturers put there own skin into the OS (ex. Sense, TouchWiz, Blur, etc.) which needs to be tested and updated to ensure it works properly with new Android versions.
4. Many cell carriers add in their own software (bloatware) that has to be tested.
5. Cellular carriers need to test and approve the software (once they receive it from the device manufacturer) before they push it out to devices.
6. Cost to benefit ratio for the various device manufacturers and cell carriers. They can't always justify the cost to continually test and push out newer software versions for every device. They will however tend to focus on maintenance releases to swash bugs.
In comparison, Apple has a very different model in that they produce the hardware (limited types of device models) and the software with little to no carrier involvement. They also use their own updating mechanism mainly via the iTunes software and only recently via OTA with the latest IOS versions. Basically this whole setup gives Apple greater control of the ecosystem of their products. So as long as the hardware can support the newer software, it will most likely get it.