Because simply just straight up giving the Sandanistas the weapons would have been too complicated? ("I got an idea! We'll cover the arms trail by recording it as transporting and selling cocaine to poor people in the inner city!")
Like Reagan creating, funding, and training al Queda .... including how to use an airplane as a missile?
The resulting two decades spanning Afghan War 20yrs later?
The agreement withdrawing from said war signed with the very enemy we fought there 20yrs later?
The Iraq War over aluminum irrigation tubes that were supposed to be the WMPs we gave them to fight Iran with while supplying Iran with arms as well 20yrs prior?
100,000 dead and 50,000 missing (Club Med, maybe?) in Guatemala for the sake of Chiquita Bananas and other CIA lead coups throughout Latin America and the rest of the world?