The idea that a product has a single well-defined value is fundamentally flawed. The value of a product to it's owner is not the same as it's resale value can be very different.
Accountants and taxmen come up with standardised depreciation formula. The purpose of these formula is not to determine the market value of the asset. It is to account for the impact of capital purchases on a company's profit/loss.
If you want to know the market value of an item you have to look at the market. You can't calculate it from first principles, you have to look at what other sales are happening and then apply a premium or discount for the circumstances of your sale.
Buying products (not just cars) new means you are getting a product straight from a trusted supply chain. Buying used, even nearly new, raises a whole bunch of questions about the item. Has it been abused in some way? does it have some hard to pin down problem? Has it been involved in some form of crime? are the manufacturers warranties/support packages fully transferable?
You can try to answer these questions of course, but there is both a cost to answering them and an uncertainty in the quality of the answers. So in normal circumstances, used products, even nearly new ones, will trade at a significant discount over new products.
The same used product will also trade at different prices in different situations. A dealer selling retail can charge a premium over a private seller because they are convenient, will perform some level of checking on the car and it's paperwork and will provide the customer with a guarantee. At the other extreme dealers and car-buying services that will take a car off you with a minimum of hassle but they will probably pay you less than you could make in a private sale
We aren't exactly in normal times though, supply shortages are a major problem at the moment. Buying products new from official suppliers can often involve long waits, and this is bumping up the value of used products.