In 1988, Saddam Hussein dropped nerve gas on Kurds. Saddam was then a US ally and a foil against Iran. The US had propped up that war killing
millions of Iraqis and Iranians for almost a decade for basically a net zero outcome. Why was Iran an enemy? Because the US deposed the democratically elected government in 1953 becasue they threatened to nationalize their own oil reserves.
Do you see a pattern here? Like at all?
The key point is that Saddam could drop nerve gas on Iraqi citizens and it still didn't change him being a US ally (and puppet). We don't care about someone being "bad". We never have. Saddam only ceased to become an ally when he invaded Kuwait and threatened our truly regional ally, Saudi Arabia.
All Castro did was overthrow Batisa, another US ally, and nationalize Cuban assets.
Hungary is a member of NATO and a US ally despite Viktor Orban essentially overthrowing democracy and genuinely being bad.
We helped overthrow Basher Al-Asaad. The al-asaads were former US allies too by the way. Why? Because now they were bad. Who is the new Syrian president? A man by the name of Ahmed al-Sharaa. Who is that you might ask? A former al-Qaeda leader, you know the guys were the Big Bad [tm] for 9/11. But that's OK, he (allegedly) cut ties with al-Aqeda in 2016 so all is forgiven. Let's not look too deeply into 15 or the 19 9/11 hijackers being Saudi.
Here's the lesson: whenever the US says someone is being punished, bombed, sanctioned, invaded or whatever because they're "bad" know that it's a lie. I mean they might be bad. But that's never the reason for whatever the latest punitive action is. Always, always, always the reason is become the interests of US foreign policy or Western companies is being threatened.