That isn't quite right. Most companies continue to improve software, they just don't release updates. They fix minor bugs and add new features, but you can't get at that without buying a new car as they don't provide means to do updates. (major bugs trigger a recall, sometimes everyone gets the latest, sometimes they apply the fix to each branch)
They might use the same hardware for 20 years (in that time at least a few parts will go obsolete to be replaced with something functionally identical), but if yours breaks you will get that hardware with the version of software released for your car even though the software from a later model year would run on the same computer and have more features.
Note that just because the software will run doesn't mean the system will. Sometimes they change network interfaces in incompatible ways so the whole car will not work in some way which could be major or minor depending.