As a way to pay off the european organised crime gangs US intelligence gave them heroin to sell.
Why did the US need to pay crime gangs?
Because they denied the europeans sovereignty and democracy, and used the mob as a tool to stop political organising.
But the mafia doesn't work for free, and maybe you've wondered why Frank Sinatra spent so much time in pre-revolutionary Havana, and how Lucky Luciano came to be a global leader.
And, why it was such a nuisance that the cubans shrugged off the informal occupation.
This is why. The US hired the mafia, the mafia accepted, then met with the usian mafia in Cuba because you need to sell the heroin somewhere that's not home, when the US felt it had lost control and jailed some of the mafia leaders it was way, way too late.
If this is new to you, read Alfred W. McCoy, plus Wikipedia.