The main purpose of a down payment is to ensure that the lending institution can recover the balance due on the loan in the event that the borrower defaults. In real estate, the asset is used as collateral in order to secure the loan against default. If the borrower fails to repay the loan, the lender is legally entitled to sell the asset and retain a portion of the proceeds sufficient to cover the original amount of the loan.
By requiring a down payment in advance, the lender greatly increases the chance that any such future sale would be able to cover the full amount of the loan, because such a sale only requires the lender to recover the difference between the original selling price and the amount of the down payment, as opposed to the entirety of the original selling price.
If the borrower is unable to pay off the loan in its entirety, he/she forfeits the down payment amount.
For car purchases the down payment could be anywhere between 3% and 13%. Similar for purchases of comparable price.
There is more risk for lenders when individuals purchase a home as an investment property. Therefore the lender may charge a higher interest rate and expect a higher down payment.