All cars depreciate. If you car depreciates more quickly than you can pay off the loan or finance, then when you get your insurance payment, it doesnt pay off the finance leaving you to pay to fill the GAP. Unless you have GAP insurance.
Replacing your car with a car in the same condition
Replacing your car with a car in the same condition may cost more than your insurer thinks is fair because there of lots of similar, cheaper cars on the market. Insurers often dont accept that the car you lost was better in certain subjective ways such as condition.
Is this fair?
At any time, every car has a range of possible FAIR values.
Your motor insurer will always want to pay the lowest price available.
If you look after your car, or it is low mileage, or has nice extras, then you are likely to find that you need to pay TOP market rates for a replacement car.
But the insurer will want to pay LOW or TRADE prices.
Which creates a GAP and the GAP insurance pays for this difference in price.