What works in this world is pragmatism, Greg. Political decisions are made on the basis of pragmatism. The USA could have chosen to work with Castro after he kicked out Batista, and if they had...no one in America would ever have called him a "communist". "Communist" was an ephithet used in the USA to curse people whom one wished to position as enemies for some pragmatic political reason.
It still is, to some extent. Old habits die hard.
The USA is presently working most marvelously with Communist China...and the Chinese, though still officially "communist" are embracing capitalism bigtime.
Why? Mutual pragmatism. They need each other at the moment.
However, your point that "his head-butting with the US served to shore up his power. There's nothing like an enemy 50 miles off your shore to give you something to rally around and to distract from..."
That point is well taken. You're quite right that he used that to shore up his power, and the Americans did quite a bit to help him in that regard...which is kind of ironical, I think. They produced the opposite effect to what they wanted. This is why Sun Tzu says, "To attack an enemy is to give him strength".
They could have worked with Castro. Had they done so, the Russians would have had precious little input into Cuban affairs from that point on, in my opinion, because working with the USA would have been much easier and much more profitable for Fidel.
Man, if Fidel had been willing to kill for the CIA and to run that island as a virtual slave labour camp for American sugar companies into perpetuity...the USA would have loved him. He would have been "our trusted friend and ally". Elections or no elections. That's how it works.
It's never about democracy. It's never about human rights. It's always about money, strategic resources, business, and trade....oh, and military advantage, of course. Cuba is a very strategically powerful location in the Caribbean...that's why the USA is still in Guantanamo.
I note that the Russians have never had the privilege of such a base in Hawaii....or Mexico....or South Korea...or Taiwan...but the USA gets a base in Castro's Cuba! Incredible.
Don't you get the impression that the USA just gets to have its cake and eat it too? I do. That's what pisses me off about American foreign policy...the sheer overweening arrogance of it all. They get away with what no other nation can or ever would...because they figure they sit on the right hand of God or something. Oh, and because they can incinerate the world too. That always helps.