Residents in Wem, Shropshire, were alarmed when The Thomas Adams School carried out the explosion on Monday while children were trick or treating.
The 19:30 GMT blast was supervised by police and bomb disposal experts.
Head teacher Liz Dakin apologised for "distress" caused, but said the school had followed police advice.
For more stories from Shropshire
Police said they had also supervised two similar controlled explosions at schools in Redditch and Evesham in Worcestershire, also on Monday.
The De Montfort School in Evesham said a controlled explosion had taken place after the end of the school day and there was "no ongoing risk to students or staff".
In Wem, residents complained on the Lowe Hill school's Facebook page about the lack of advance warning.
One said the noise was "immense" and "worrying", especially when families were out celebrating Halloween.
Mrs Dakin said the school was acting in response to advice from Government advisory science service CLEAPSS to check for the chemical 2,4-DNPH - sometimes used in chemistry lessons.
If not stored properly the substance can cause serious harm.
Police were in attendance for its disposal, but Mrs Dakin said: "We also were not aware of how big the bang would actually be.
"We do apologise to the public for any distress caused but, of course, we were following police instructions."
She added police had told her their time is being taken up by doing the same thing at schools across the country.
The school was open as usual on Tuesday.
West Mercia Police said officers assisted an explosive ordinance disposal unit who conducted a controlled explosion on some chemicals.
Safer Neighbourhood Inspector Nigel Morgan said: "The chemicals were safely dealt with by the EOD unit on the school playing field at around 8pm last night and although local residents may have experienced a loud bang, all relevant steps were taken to ensure that the local community were kept safe from harm".
A school that blew up old chemicals on its playing field has been criticised for not providing a public warning of the blast.