That being said, cars are often "written off" or somehow declared illegal to ever be driven on the road again once they have a certain level or kind of damage. This is done to keep everyone safer by removing vehicles that don't meet an acceptable minimum standard.
If I chop up 5 cars declared illegal for road use, and make one car from them, is it safe enough? How is that tested? Usually, people that are "re-birthing" cars are not interested in telling the new buyer the history, so nobody will even know the particular car has a questionable safety history.
Would you be happy driving your young family in a car that I welded together from other cars?