Since we're in the SEO land let me ask a relevant question. Say I have an e-commerce site. If I buy an expired domain from some other e-commerce site which was in the same market as mine can I have any benefit whatsoever?
Yes. This is now a common white hat tactic. That instead of paying someone to try and build links for you (blindly email a bunch of sites and ask for links). You purchase a site and then direct all of that traffic to a subdomain of your site / 301 the entire domain over / 301 specific URLs over to the new resources (which one of these that makes sense is case specific).
or you just use that domain for your site, as it (supposedly) already has built Domain Authority and Trust Flow. Redirects pass on some linkjuice to the redirected domain. But not as much as using the domain that HAS it built up already.
A grey/black hat SEO tactic is to use that domain as part of a PBN (private blog network). Basically manufacturing backlinks to boost your money site.
This is part of why people buy sites on Flippa or Borderline.biz or whatever. There's a lot of factors that go into it: is it still getting traffic? Is it reputable? Is it listed as a malware site? How closely related to your own site it is, etc.
If you're starting out on a new project and would like to get almost _any_ organic SEO traffic in the first year of your existence, you should probably buy a domain (domain age is that strong of a ranking factor).
Wouldn't that mean a website that has been transferred to a new owner would have to start from scratch? Unless Google has a way of distinguishing an old site from an old domain.