Before the coups, we were very hostile to the Chilean and Indonesian governments, but we continued to send them arms. Keep good relations with the right officers and they overthrow the government for you. The same reasoning motivated the flow of US arms to Iran via Israel from the early 1980s, according to the high Israeli officials involved, facts well-known by 1982, long before there were any hostages. The Kennedy Administration prepared the way for the 1964 military coup in Brazil, helping to destroy Brazilian democracy, which was becoming too independent. The military typically proceeds to create an economic disaster, often following the prescriptions of US advisers, and then decides to hand the problem over to civilians to administer.
Brazil is an instructive case.
It is so well endowed with natural resources that it ought to be one of the richest countries in the world, and it also has high industrial development. The Ministry of Education reports that over a third of the education budget goes to school meals, because most of the students in public schools either eat at school or not at all. That's Brazil, one of the naturally richest countries in the world. The situation is similar throughout Latin America. Just in Central America, the number of people murdered by US-backed forces since the late 1970s comes to something like 200,000, as popular movements that sought democracy and social reform were decimated.