Having worked in the insurance industry for more years than I care to remember (over 10 in motor claims) I can assure you that the insurers will have taken the most economically viable option. In this case, to repair!
Internet valuations are notoriously inaccurate, and your insurers will no doubt value the vehicle based on trade guides + their own matrix for repair costs/salvage costs.
One of the main principals of insurance is to ensure that you are returned to the same financial position that you enjoyed prior to the loss. In your case, you now have your car back, repaired and needing an MOT (which it needed anyway!) If however, the INSURER rather than the garage confirmed that the car was a total loss, then you are in a somewhat stronger position to argue that you would finacially be at a loss (given that you have paid a deposit on a new car) if they do not now honour their decision to write off the vehicle. PHEW!