Intelligence agencies already exist for a long time. It has always been very important to gain as much information about adversaries as possible. In ancient China, for example, the best war was a war that didn't have to be fought because of the efforts done by the own intelligence agencies.
Nowadays, nations are no longer divided into two camps of allies and adversaries. For the work of intelligence agencies, this means that for economic espionage one's potential adversaries could well be one's military and political allies. This leads to situation in which different agencies have both to compete and co-operate at the same time. A nation's commercial interests and the military and political interests it shares with its allies may explain several conflicts.