Cuba was never Franquista, of course. As soon as it was clear that Juan Carlos I was going to back a democratic transition, Cuba was happy to see the Franquista diplomatic corps on its way out.
This was just a bit of realpolitik, the kind all states engage in when it matters