Question: Why do they (e.g. characters in american movies) say "he's with the FBI" or "she's with O.I.A" instead of for instance "he's from the FBI" or simply "he works for the FBI"? Is the expression "be with " used in any other contexts?

Answer: 
Because it sounds scarier.

If someone's from the FBI, the FBI is somewhere else and I'm talking to an employee who's been sent here.

But if someone's *with* the FBI, the FBI are *here*! They're talking to me right now!
The FBI is a force to be reckoned with. They are rarely alone, and where there is one, there are usually several more very close nearby. Each operation is backed by the force as a whole. That is probably why the term is "with the FBI" and not "from the FBI".