It’s true. But… it’s also economics. Government A funds a “terrorist group” or “resistance group” or “political group” “dissident group” “faction” or government because it serves government A. Government B does the same. Sometimes if A and B have opposite interests or are just hostile or adversarial they fund opposing sides intentionally.
Sometimes your side becomes a new power base in that region and your involvement can give you influence, friendly relations, information, leverage, and you must consider this- troops trained on your weapons systems and tactics, if or when they become a regular military and government they often will want to keep using your equipment and tactics. It’s what they know and they’ve built a fighting force around. That not only secures long term arms deals but also builds reliance on friendly relations for support and and upgrades.
Using Iran as an example of this principle- when we wanted to be friendly the US supplied fighters and other equipment. As long as Iran and the USA stayed friends Iran would have support and america would have money. This relationship compels friendship or civility if not unbalanced. Ideally for the supplier it is unbalanced and the recieving party is basically on a leash. Iran and the USA didn’t stay friendly as Iran didn’t want to play ball the American way. So they were cut off and in the modern day their air force and other military supplies suffered because without American supply lines it was difficult to maintain the American equipment they built those services around.
It is in a way a type of strong arm diplomacy. On the other hand sometimes your side doesn’t come out on top, and occasionally things change in ways that weren’t predicted. Peace can be exactly what some don’t want. Say that two sides, small nations or factions of a civil war are in conflict. If that fighting is far away from you, if the weapons being used are not feasible for globe spanning war but suitable to local conflict- you probably aren’t too worried about your dog in the fight biting you. Not only are you out of reach, but they have another dog trying to kill them. Their attention is on their war. Even if they hate your guts- they can’t fight you, the one feeding them, and the guys trying to kill them at the same time.
If those sides suddenly make peace or one side is routed, you have a potential problem as you have a lot of angry fighters and weapons of war with no wars to fight. When people have armies and lots of weapons and problems- they tend to make wars. People that hate you or can gain from your loss may make war on you. Perpetual regional conflict helps to keep various groups occupied and helps tie up weapons that are floating around.
Sometimes your side becomes a new power base in that region and your involvement can give you influence, friendly relations, information, leverage, and you must consider this- troops trained on your weapons systems and tactics, if or when they become a regular military and government they often will want to keep using your equipment and tactics. It’s what they know and they’ve built a fighting force around. That not only secures long term arms deals but also builds reliance on friendly relations for support and and upgrades.