I don’t see why that’s not a fair comparison. A $40k new car can be bought for around $14k if it has around 80-100k miles. Given an average driving of 10k miles a year, a new car would reach 200k miles in 20 years and the old car will reach that in 10 years.
You might want to double check your figures here.. a $40k car that is 10 years old with 100,000 miles on it will command less than $14k.. try using KBB.com (Kelly Blue Book).
Here is an example.. a 1996 BMW 750il with 90,000 miles on it, in excellent condition, will go for about $14,230 from private party. A 1996 BMW 750il did not cost $40K new.. try closer to $80k to $90K.