If you total your car, but elect to keep it, insurance companies deduct the salvage value from your payment. ("Total" is a theoretical construct. After I was hit-and-run sideswiped while parked by a Brunswick, ME snowplow, and couldn't get the town to pay, I was able to repair my car far more cheaply using fiberglass.)
Both of these loopholes are annoying. Insurance is partial, that's just how it goes. We share risk.