Why was the TSR-2 literally burnt down even before its first official flight?
The TSR-2 flew quite a few times (24 times); atleast the first prototype did. The mockup was burnt, not the prototype- one of them was shot to pieces for target practice, so pretty much the same fate. 


The main reason cited for the cancellation was costs- the rising costs (quite common in new aircraft development), with the expected unit cost triple of original estimates led to the cancellation of the (behind schedule) aircraft by the cash strapped UK govt. The projected replacement, F-111 was also cancelled for the same reason. Note that TSR 2 was the last time the British went solo on combat aircraft development (with the exception of Harrier)- the amount of money required was simply more than what was available.
Strictly speaking, the test flights were not flawless - there were engine and landing gear problems, though these were typical in aircraft development. Though these were not insurmountable, the test flights were fairly typical of aircraft development and nothing special.
The test aircraft was not fitted with the full avionics package; so there is no way measure its performance. However, the entire system was new and would've caused issues with integration and performance (though in all fairness, there was no indication that that would be a great problem), not to mention the effect on cost.
Quite a few of the components developed for the aircraft (The engines, for example) were later used in other aircraft projects, so the program wasn't a total loss.


To a certain extent, development, manufacture and operation of new aircraft requires political will more than technical capability (which can be obtained, given enough time and money); the British govt. didn't have it.