Let's be clear, Castro was a murderous bastard who impoverished his country, and whose views on homosexuality and on the importance of brevity in speeches were nothing short of horrifying. It's true, Cubans do have access to better healthcare than many countries of equivalent GDP per capita, and if I had to choose a Communist hell-hole to live in, it'd probably be Castro's Cuba. But the Cuban healthcare system is not the fantasy of western dewey-eyed left-wingers, and Cubans often are excluded from what excellence there is, as it's one of the few means the country has of generating hard currency earnings. Rich foreigners get the best doctors, and more are exported to other successful "progressive" regimes like Venezuela.
"But he was an anti-imperialist". So why were cuban troops in Africa in support of the USSR, which was by any measure or definition an Empire? Anti-Imperialsim is just the justification leftists give for knee-jerk anti-Americanism. And the flood of people risking death to reach the USA should tell you all you need to know about the relative merits of America's and Cuba's system.
Contrasting the attitudes of the USA to Castro, to their attitude to equally murderous bastards like Pinochet misses the point. The US embargo on Cuba is one of the legacies of the Cold war, kept bubbling by the politics of Florida, home to so many Cuban-Americans. There is no Doubt that the US blocade has impoverished Cubans, and that with the fall in the Berlin wall and the collapse of the USSR, such an embargo was no longer justified. However politics are what they are. Fidel Castro's death provides an opportunity for further thawing in relations.
The USA supported "our son of a bitch" all over the world, turning a blind-eye to horrific human rights abuses, though often (albeit less often than we should) working behind the scenes to try and mitigate the worst behaviour. Thatcher is rarely credited with preventing the execution of Nelson Mandela, but she consistently urged Mandela's release, even as she argued against sanctions and branding the ANC "Terrorists". This is one reason why the cold-war piles of dead of Nasty fascist bastards are usually lower than those of nasty communist bastards. I also think the point made by CS Lewis holds. Right wing dictators rarely pretend to be GOOD, making their appeal more on effectiveness.
"The robber baron's cruelty may sometimes sleep, his cupidity may at some point be satiated; but those who torment us for our own good will torment us without end for they do so with the approval of their own conscience."
And one by one, following the collapse of Communism, the support from the USA and its allies for these disgusting regimes was withdrawn. Apartheid South Africa, much of South and Central America saw right authoritarian regimes fall. Genuine democracies were often created in the rubble. The USA didn't support dictators because the USA is an imperialist power, but because it IS a power, and with that comes responsibility. They judged at the time the alternative, Communism, was worse, and represented a genuine existential threat to the USA and its core allies.
This is why for example the USA and its allies mostly support the Regime in the Kingdom of Saudi Arabia. The Saudi regime is repellent, but given the probable alternatives wouldn't be nice, liberal, democratic-minded progressives, they'd be salafist nutcases who'd have access to billions of dollars of oil revenues and the legitimacy of being the Guardians of the Two Mosques. The House of Saud is all that stands between the West and a plausible salafist caliphate with sufficient legitimacy and money to one day threaten the west. We'd rather do business with nice, stable democracies under the rule of law. But seeing as we cannot do to every country on earth what we did to Germany in the late 40s and 50s, we make the best of the options given.
Castro appeared to be a true beleiver in Socialism, so he refused to recognise his philosophy had failed, and his island limped on, a socialist throwback in the age of globalisation. The current poverty of Cuba is partly America's doing, but mostly due to decisions made by Castro himself, policies which set him and the Cuban people at odds with the regional hegemon, in persuit of an evil idealogy. Fidel Castro was on the wrong side of history, and his people suffered because of his stubborness. Now he's dead, it's Cubans turn to make the most of the positive legacy - Cubans are the best-educated poor people on earth, and the mighty economy of the USA is right on their doorstep. There is going to be a lot of money to be made there, and this time, for the first time, Cubans will share in it.