pull down to refresh

Does anyone know how the United States government decides who US companies can sell military hardware to?
I assumed they dont want the weapons to get into the hands of aggresive nations. But that does not seem to be the case.