The conspiracy theory is that it was to keep poor people down.
The reality is that they didn't directly sell drugs, they just protected people who did to financially support terrorists, or prevented interdiction to protect traffickers who gave them information that could be used to stop drug trafficking.
This was acceptable to them because they considered poor minority communities unimportant.
It's kinda worse, but it wasn't an attack on the poor. They weren't considered important enough to attack.
They were just an acceptable loss if it meant some people had the money to machine gun Nicaraguan civilians.

