Earlier quoted context omitted.
Why is the US part of the consideration? How do you think it became Spain? Do you think some African dudes one day started saying "Hola, ahora somos Españoles?" Nah, some Portuguese guys with weapons showed up in 1415 (it was Portugal before becoming Spanish through marriage). You know what you call it when people with weapons expand their territory on other continents? Imperialism.
How do you think Morocco became Morocco? Do you think some Moroccan dudes one day started saying they are Moroccans? That's how stupid your question is. There are several countries that span over more than one continent and that doesn't mean they have to give away their territories just because.
The only reason to hold on to it at this point is Western chauvinism. The rest of Europe has long given up its colonial holdings in Africa. Why are Spaniards holding on to this relic that causes nothing but trouble? Just let the Africans have Africa.
Same logic applies to Gibraltar (just let the Spanish have Spain) and the Falklands (just let the Argentines have Argentina) fwiw. All these little colonial outposts cause nothing but trouble and only still exist because of chauvinism