The answer is financial - not technical
If the cost of the repair plus 10% exceeds the cost of a replacement aircraft then it is usually written off by the insurance companies.
However it may be that the aircraft remains are sold off by the insurance companies but may re-appear in the skies at a later date