The Threat to National Security
The threat to national security arises because what Phorm do is espionage.
Spying on private/confidential personal & commercial communications to gather intelligence which damages the organisations, businesses, and individuals targeted.
That would include police, judges, military personnel, politicians, as well as members of the public, and the businesses and organisations they work for.
Whats worse is that the software BT/Phorm used was supplied by a shady organisation (OCS Labs) with a history of distributing malicious rootkits & spyware.
Thats where GCHQ failed. They failed to protect the UK's national security interests from illegal covert communications espionage.