I know very little about Spanish history, but why would General Franco, who spent decades as dictator, choose the grandson of the deposed King to replace him? Did Franco want democracy restored? Did he believe Juan Carlos would continue his legacy?
Juan de Borbon, Juan Carlos 1's father, was quite pushy in his demands to Franco about the restoration of the monarchy. Franco didn't like that, he in fact didn't like Juan the person much. Franco always stated that Spain was a "Kingdom without king" under his rule. So as a means to humiliate Juan, the legitimate heir to the throne, Franco chose JC instead. Juan was not happy! Franco took JC under his wing and taught him in the ways of the regime. He was supposed to rule as an absolute monarch. This power was useful for him to maneuver towards democracy. People obviously didn't trust him at first. They made jokes calling him Juan Carlos I the brief. But he did a good job for himself and his family helping the transition to democracy. The whole process of the Transition is quite fascinating. Worth reading about.