I think it is important to factor in resale/trade in/residual value in when buying a car. It shows that the vehicle is desirable because it is most likely still working good after X miles and Y years.
It also important when in the unlikely event your vehicle gets totaled in an accident or what not. Insurance pays out the wholesale price usually... higher residual vehicles have higher wholesale price. It wouldn't really matter if you were leasing / financing and you bought gap insurance.
But for those that didn't buy gap insurance or paid cash, it is good to know you won't be getting 30% of the buying price of your vehicle when brand new after 4 years when some bad driver rear ends you and it's a total loss. Especially when your vehicle was in perfect working order before the accident.
I tried to convince my wife to get a lexus ISF (used) before getting my 2015 4runner limited. With a newborn on the way, it wasn't going to work... A new 2014 Lexus ISF is close to $80k. A 3 year old one (2011) was asking for 40,000 even with 20,000 miles on it. It to me was a great buy. 5.0L v8, 400+ hp. Lexus reliability.
However when I shopped for 4runners, I couldn't find a good deal on a used 5th gen. So i bought a brand new one instead.