Dear Jean,
Let's first talk about depreciation. All new cars depreciate the moment the owner drives the car off the lot because the car essentially becomes a used car instantaneously. It is therefore worth substantially less, even though it may be the current "new" model year and have very few miles on the odometer.
As a result, car buyers who put no money down when they buy a new car -- and especially if they roll in the taxes, title and other fees associated with the purchase into the car loan -- are said to be "upside down" in their car loan, meaning they owe more than the car is worth. To prevent being upside down, people make a down payment, so the amount they borrow is equal or less than that initial depreciation loss.
Now to your question of losing the down payment if you decide to sell your car: The answer is that you are essentially "losing" the initial depreciation amount whether it is in the down payment or in the car loan.
Look at it this way: If you buy a $25,000 car and finance the whole amount, then you immediately decide to sell the car and it's only worth $20,000, you still owe the remaining $5,000 on the loan. You will need to pay that amount to clear the car loan. If you take the same scenario but put down $5,000 initially, the loan will be clear when you go to sell the car.
In one instance you've paid the $5,000 upfront and in the other, you are paying the $5,000 later. Either way you are "losing" that $5,000 plus the interest associated with that amount if you opt for financing versus a down payment.