I am hoping there is more to the answer than what I can find on Wikipedia.
https://en.m.wikipedia.org/wiki/Jordan%E2%80%93Palestine_relations
Very long story short: because both Egypt and Jordan recognize that the territory isn't theirs to occupy or annex, although they came to this realization in different ways.
Gaza has always (historically speaking) been distinct from Egypt - I answered a similar question last week, but in the period between 1947 (Israel's establishment) and 1967 (Six Day war, when Gaza--and the entirety of Sinai--were occupied by Israel), Egypt's interest in Gaza was primarily in its utility as a military resource against Israel and had very little to do with Gaza itself (as in, interest in actually acquiring the territory and annexing it to Egypt).
As the Wikipedia article you linked to says, Nasser (president of Egypt 1954-1970) was a supporter of the Palestinian movement, and Gaza, as territory belonging to the mandate that was not incorporated into the territory of Israel after the war of 1947-49, was one of the obvious possessions that would need to belong to the future Palestinian State. Nasser, as the most prominent (in his mind) Arab leader saw himself as the most suitable person to push--diplomatically and militarily--for the return of Palestinian territory from Israel.
Gaza was under the administration of a "Free State of Palestine" (a puppet government under the control of Egypt) between the end of the war and the establishment of the United Arab Republic, when it was placed under emergency military administration, which lasted until the 67 war (the rationale here being that a unified Egypt and Syria were hoping to be able to militarily dominate Israel, for which Gaza would be needed).
However, even during this period of Egyptian administration, there was no free movement between Egypt and Gaza--Gaza residents had to have travel documents from the administrative authority to cross into Egypt, which maintained that the border remained an international crossing. When Anwar Sadat negotiated the return of Sinai as part of the Camp David Accords, Gaza was not included--probably a shrewd move on his part, given how the Arab world reacted to Jordanian annexation of the West Bank (as it was, the Egyptian-Israeli peace treaty was seen as a huge betrayal of the Palestinian cause, as there was a general agreement that no Arab country should make peace with Israel until the Palestinian issue was settled).
Jordan, by contrast, annexed the portion of Palestinian territory that it occupied during the 1947-49 war, and this was hugely controversial--other Arab countries didn't see a lot of difference between Israel's occupation on one side of the armistice line, and Jordan's occupation on the other. Saudi Arabia, Egypt, Lebanon, and Syria tried to expel Jordan from the Arab League because of the annexation -- there are complex politics involved here that go beyond mere issues of control over the West Bank, but suffice it to say, the Arab position was that Palestinian territory should remain Palestinian.
The short version is that the King of Jordan--Abdullah I--was the son of the hereditary ruler of Mecca and Hijaz (the coastal region of what is now Saudi Arabia where Mecca and Medina are located), and his father--Sherif Husayn bin Ali-had been pushed into exile by the Saudis. Husayn had made a play to become the King of all of Arabia--basically the entire Arabian peninsula *and* greater Syria *and* Iraq during WWI, a goal that went unrealized, and there were concerns that Abdullah was trying to accomplish through annexation what his father had been unable to do.
The Jordanians did grant citizenship both to Palestinians who remained on the West Bank and those who fled into what is now Jordan--something that no other Arab country that received Palestinian refugees had done, or has done since. And the West Bank was given an equivalent number of seats in the Jordanian parliament as the rest of the country.
That said, all was not well in the West Bank at the time. Abdullah was assassinated by a Palestinian in 1951 who was angry about the annexation. The Jordanian annexation left no room for Palestinian nationalists; residents of the West Bank were expected to consider themselves Jordanian, which--again--in the eyes of the people who lived there didn't really make the Jordanians much more popular than the Israelis. It has since become known that the Jordanians cooperated under the table with Israel to tamp down on Palestinian militants who staged attacks in Israel from the West Bank.
The occupation of the West Bank in 1967 created something of a crisis for Jordan -- half of its parliament comprised politicians who represented districts not under its political control; and the Palestine Liberation Organization (PLO) under the leadership of Yassir Arafat relocated into Jordan proper, and began operating autonomously as a state-within-a-state. Things came to a head in 1970 when the Popular Front for the Liberation of Palestine (PFLP) hijacked several European and American airliners and flew them to an airstrip that its paramilitary controlled in Jordanian territory; the Jordanians were unable to act, and it was a huge embarrassment for King Husayn (Abdullah's grandson and successor). Things came to a head in late summer with a civil war in Jordan, pitting the Palestinian militant groups against the Jordanian government--these events are known as Black September. The crisis ended only with direct intervention from Nasser, who personally oversaw the negotiations between Husayn and Arafat, which ended with Arafat agreeing to move to Lebanon (Nasser saw them both off to the airport afterward and had a fatal heart attack shortly after returning home).
For almost the next two decades there was a running competition between the Jordanian government and the PLO as to which was the legitimate representative of the Palestinian people; the Jordanian royal family had been granted--and, in fact, still is--custodian of the Islamic holy sites in Jerusalem, and continued to pay for the upkeep of roads and infrastructure in the West Bank, even as Arafat and the PLO became more and more popular with Palestinians. Eventually, the Jordanians relinquished their claim to the West Bank in 1988, recognizing the PLO as the legitimate representative of the Palestinian people.
This was also partly necessary because of an internal political crisis; parliamentary elections hadn't been held in 20 years due to the occupation of the West Bank (the residents of the West Bank being unable to vote in them, but half the seats in parliament still represented the area). Parliament had become a rubber stamp, Jordanians were chafing at the bit under what they saw as an authoritarian government, and, by renouncing their claim in favor of the PLO as the legitimate representative of the Palestinians, they were able to restructure the parliament by getting rid of the representation of the West Bank. In the 90s, it was generally recognized that Husayn had saved his throne by liberalizing and opening the country up to elections; unfortunately for Jordan that trend did not continue into his son's reign.
Jordan eventually made its own peace with Israel in 1994--this being far less controversial, as the Oslo accords had been signed the year before, which laid the groundwork (still unrealized) for Palestinian autonomy and a future Palestinian state.
So--long story short--both Gaza and the West Bank, were collectively seen by the Arab world as Palestinian territory-in-waiting, attempts at unification/annexation were unpopular and unsuccessful, and the general consensus is that their futures should be decided by the people who live there and their chosen representatives.