One of the reasons that Google became a domain registrar is so that they have access to information about domains - primarily to see when a domain changes ownership.
When both the site on a domain and the owner of the domain change at or near the same time then Google is able to see that it is effectively brand new and can then completely ignore whatever history it had regarding that domain.
Existing backlinks to the domain will only be useful where the new site being set up on the domain is close enough in terms of what it is about that the owners of those links don't decide to delete them as no longer relevant to visitors to their site.
Effectively if you are buying a domain to host a new site then the domain will be treated as a new domain as any past use of that domain is no longer relevant.
The only time the domain age would be retained when the domain is sold would be if the associated web site was included with it and continued to exist under the new ownership.
Many old domain names are significantly overpriced given that in most cases it will only make a difference to those visitors who actually access the site directly by typing in the name.