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: 
The word "with" carries connotations of unity, whereas "works for" implies a subordinate position. The word "of" carries only the connotation of "part of" (or sometimes "from") and does not imply authority; neither does "works for." Thus, use of the word "with" implies all the authority of the object.

In context, we can look at the following sentences and their resulting weight of authority:

1. I work for the United States Government. This could mean I'm a census taker, or a soldier, or a mail carrier. The denotation of the word "work" is clear and limited.
2. I am of the United States Government. This sentence is uneven and makes no sense in common use.
3. I am with the United States Government. The use of the word "with" does not imply that the subject IS the United States Government, but does broadly hint that the subject has access to or the ability to utilize the authority and/or power of the subject.
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".