It's a complex problem.
You know that if you don't sell the weapon systems, the Chinese, Russians or French, who have no scruples on the matter, will. Then you've lost the sale, the follow on sales, and access to the customer nation's military.
In addition, by selling your own weapons, you are better able to counter tactics if they're ever used against you, have control over performance configurations, and can limit the capability to what you intend to transfer. I also like the idea of embedded technology that can render performance degrades in case they become hostile.