The fact that the modding community can turn on OS around in a few weeks and push it back out to the device is testament to how easy it is to put these newer versions of software on the phone, and it just the manufacturers trying to add their own crap back on that is the issue.
It is not that simple.
As just one example, ROM modders are willing to put up with "brick rates" that would result in class action suits if a device manufacturer and carrier tried the same thing. A 99% success rate -- which a ROM modder would probably consider to be pretty good -- would still mean in excess of 10,000 bricked G1s, 10,000 bricked Magics, etc. ROM modders simply are willing to use techniques (e.g., re-partitioning flash) that device manufacturers deem too risky. Hence, device manufacturers and carriers elect to be more conservative, so they do not wind up with millions of dollars in extra support costs.
Applying HTC Sense and MOTOBLUR and such to new Android releases does indeed involve work, and that definitely has an impact on upgrade availability. But it's not the whole story. Some of the reasons are good for consumers (e.g., minimizing bricked phones), and some of the reasons are bad for consumers (e.g., emphasizing new products at the expense of old).