Expedition to Ceuta was an interesting event with the end goal of the expedition not being actually known to anyone (except the inner circle) until basically the fleet had set sail. We may find it strange that there was all this troops raising, ships requisitioning, weapons and supplies gathering, with none of the men involved actually knowing where they will go, but I guess that's just how they rolled.
In this absence of concrete information, speculation was rampant, and many guesses were proposed. For example, rulers of Aragon were worried Portuguese might attack Ibiza or Sicily. Some thought Portuguese were going to attack Seville ruled by Castille, rekindling the war between the two kingdoms that raged from 1383 to 1411 when it was formally ended. Some indeed proposed Morocco (Kingdom of Fez) in general as the end goal, but few actually singled out Ceuta as the main target. The main forerunner in most speculation was indeed Granada. And actually if we analyze some relevant Portuguese ideas from before, and especially after the event (on this I will go on little later) we actually do see quite a lot of desire to take over Granada.
However there was a major obstacle. Granada was sort of "reserved" for Kingdom of Castille-Leon, as this kingdom was in lore of the time considered the successor of Visigothic Empire of Spain, and had this right, which was even confirmed in some treaties and bulls. Technically the same applied for North Africa, but North Africa was abstract far away land, while Granada was on Iberian peninsula, surrounded by Castille and was a regular feature of the local politics, so Portuguese would have a easier task in justifying the invasion Morocco, then Granada. Still, as I said, many toyed with the idea of taking Granada.
Ultimately, king João I decided to take over Ceuta. Many reasons of why he did it were proposed, and it's hard to single out which was the most important. However geostrategically, Ceuta was in a very important position. It was on Gibraltar straits, so having it as base of operations allowed naval patrolling and pirating in the straits itself, as well as raiding coasts of North Africa and Granada. It was on African continent so it allowed access to Morocco and further conquest there, but it is also often forgotten that it was directly opposite Gibraltar itself, which was at that time part of the Nasrid kingdom of Granada (Gibraltar was taken by Castille only in 1462), and in fact Ceuta-Gibraltar connection was an important supply route for the Nasrid kingdom. Portuguese were hoping that by taking Ceuta they would severe this connection, and open up the option of assaulting Gibraltar and then Granada itself. King João didn't want to antagonize the Castillians by attacking Granada without their permission, especially with the risk of the attack failing, which was even more risky as the expedition was already too costly for the kingdom. A protracted war against Granada, and possibly Castille, was not a financial option, while a quick lightening raid and looting of a coastal city, might just cover some of the cost.
There were other reasons proposed why Portuguese would take Ceuta, mainly that it would allow access to North African goods and commercial opportunity. However if they really had such hopes, Portuguese gravely miscalculated. The Arabs completely cut off and boycotted Ceuta, and constantly military harassed it, making Portuguese spend considerable money on keeping and feeding Ceuta. The only income for considerable time coming from Ceuta was the naval raiding activities, and those never covered the cost of upkeep. The situation reached a point where many proposed abandoning the city completely. However the Portuguese crown never relented, even when in 1437 they promised to give back the city in return for withdrawing their army from a disastrous attack on Tangier, where they even gave up Prince Ferdinand (brother of then king Duarte) to the mercy of the Moors.
To get back few years before this event, the 1430s saw death of king João I and ascension of king Duarte, his son. Another son, prince Henrique, known also as Henry the Navigator, then tried to get his brother to agree on another expedition of conquest. The prime targets stipulated by Henry were, in order: Granada, Canaries, North Africa. And again, in the talks and plans Granada was often singled out as the prime target. Henry put a diplomatic and political pressure to get at that moment unstable Castille to allow Portuguese conquest of Granada (and Canaries) however Castillian position, firmly backed up by various treaties, bulls and documents, remained secure and unwavering, and ultimately neither Duarte nor Henry wanted to see what will happen if they ignored it. Henry's attack in 1437 went on to target Tangier, and as already mentioned was a horrible failure. Prince Ferdinand, brother of Henry and king Duarte was given as a hostage as security that Portuguese would leave Ceuta, but as Portuguese changed their mind, the brother was left abandoned. King Duarte soon died of plague, and another brother Pedro took the regency while young Afonso V came to age. Failure made Portuguese also cool of the idea of military conquest of anything for a while, so Henry invested his wealth in exploration. For the time being. Military conquests would be revived in the 1450s with Afonso V coming to age, when he would lead several successful expeditions in Morocco. By that time idea of taking Granda was firmly not an option.
Major source for this all events is Peter Russel's great book: Prince Henry "the Navigator": A Life