Probably based on what it would have cost for a body shop to either provide,spray and fit a new panel, or maybe to repair(?) the existing one, all against the age/condition/value of the vehicle. That and a bit of black magic of course!!
I should be quite happy if I were you. You have been given the market value of the vehicle, still got it and it`s roadworthy. You now have, effectively, a zero depreciation cost of motoring for as long as you keep it on the road. If the insurance company are happy to insure it the registration document entry means nothing unless you have another bump at which point you will find it has zero value as well - it was written off after all.
Probably worth running it until it starts getting expensive in parts and then offer it in part exchange against a new car - cheek will get you all sorts!!!!!