There is a long list of factors.
There are three easy reasons:
1. Model S has had a large amount of Mercedes Benz suspension, switchgear, HVAC among other things. All of those were originally expensive and have become cheaper but many still are there.
2. The Model S design was made largely following Mercedes Benz design approaches, which are classically complex, with high parts counts and long assembly processes for parts provided by outside suppliers.
3. Then consider simply the difference between design approaches in 2020 vs 2009. Industrial design transformed during that decade due to improved CAD and CAM. Tesla has improved faster than has anyone else.
All the rest is details. I would be amazed were the GM's of the new S and X to be less than 35%. They will be much, much better and much, much cheaper.
This is all fairly clear. What is less clear is all the 'secret sauce'.
I think these should not be called 'refresh'. They are entirely new vehicles, built to preserve mostly similar appearance to the former ones.
In my opinion, a look at the interior alone makes it clear that this is a new vehicle. There is far too much difference to be compatible with a refresh.
As usual, these are my opinions. I am not presenting them as facts, although I do believe they are factual.