You buy it out.
When the police impound your car, it isn't gone for good — the impound lot holds it, and you can pay to have it released and returned to your garage. The cost is covered by your in-game bank balance, so the practical consequence of getting busted is a fine rather than the loss of the vehicle.
That's the key difference from a wreck in a race. Total the car and you're genuinely down a ride; get arrested and it's a cash penalty you can recover from.