Agreed, I've seen many accidents caused by various vehicle defects, often tyre related (commonly bald or under inflated tyres) and often fatal or life changing.
These are of course always investigated thoroughly. Insurance companies pay out, but might pay out less for the offending vehicle if the defect was a significant factor in causing the accident. The payout to the third party is not affected.
Causation is important. E.g. you are involved in a head on accident and later it is found that you have a defective nearside brake light, which clearly played no part in the accident. The insurance company cannot reduce your payout as the defect was not a relevant factor.
If a drivers illegal LED headlights dazzle another driver causing an accident the insurance company cannot withhold any payment to any third party, the illegal modification does not invalidate the insurance policy, even though they may reduce any payout to the offender.