The whole problem started when the NSA realised that they were having to deal with more data than they could possibly analyse. So one of their esoteric computing projects at a private think-tank came up with M.O.D.O.S. - the Mental Organism Designed Only for Surveillance - not realising that their own secrets would end up getting surveilled allowing M.O.D.O.S. to take over.