Stephen M. Walt gives us a good example here:
Here's the basic structure of the situation. If you're a politically ambitious commander like Petraeus, you want good advice. But you also want to make sure that you and your decisions are portrayed in a positive light. So you invite some well-connected civilians to visit your operation, and you make sure you select people who aren't known for being critical of the war and who will be easy to co-opt if need be. And when the consultants come to visit for a few days or weeks, you make sure they receive briefings that give the impression things are going well even if they are not.Correctly analyzing class interests often explains what might otherwise be understood only as a conspiracy, a insight for which we can thank Marx.
Next, consider how this looks from the consultants' perspective. If you're an inside-the-Beltway think-tanker (and especially if you're someone who depends on soft money), it's a big deal to be invited to go to Afghanistan or Iraq and advise the commander. It makes you look more important to your colleagues, your boss, and your board, and you can go on TV and radio and write op-eds invoking your "on-the ground" experience. If you have to debate somebody on U.S. policy, you can sit up straight and pontificate about "what I saw when I was in Kabul," or "what General Petraeus told me when we were discussing COIN strategy," or whatever. Then you (or your organization) can write fundraising letters or grant proposals touting your connections and deep on-the-ground experience. And let's not forget the role of ego: it's just plain flattering to think a four-star general wants your advice.