Damage sounds similar to lucy's, at the end of the day the original owner had insurance to provide a new car so insurance company wrote it off.
It depends who fixed it and how long you want to keep the car for, when I get my ///M hopefully next year it's to keep forever, if I can get a Cat D as a good saving I would consider depending on what the damage was. Afterall how many owners here have bought a car secondhand and can gaurantee what repair work has been carried out by previous owners?