Many cities gave in to Alexander and welcomed him whereas others were willing to die before giving in. I'm just wondering why Tyre and Gaza were more loyal to Persia than the other cities of the region.
The author of the biography I'm reading pretty much chalks it up to those cities thinking they had a "chance" at defending against Alexander. Did those cities just fear the Persians more than Alexander, and think that giving into Alexander would mean destruction later on, or did those cities have some kind of special affinity with Persia specifically?
Our best ancient account of Alexander's conquests is Arrian's Anabasis, which talks about the reactions of Tyre and other local leaders to Alexander's advance. Arrian was a Greek historian and politician born in Roman Asia Minor in the late 1st century AD. He was a friend of Hadrian's and would go on to become a senator, provincial governor of Cappadocia, and later Archon of Athens in the 2nd century. His Anabasis draws form other previous ancient sources and deals mainly with Alexander's takeover of the Persian empire.
At the time that Alexander crossed the Hellespont in the spring of 334BCE, the Persian Emperor, Darius III, was thousands of miles away and it would be months before his army arrived in Asia Minor. Arrian describes how the local satraps (the Persian equivalent of a provincial governor) had differences of opinion over whether or not they should oppose Alexander directly by themselves:
The Persian generals were Arsames, Rheomithres, Petines, Niphates, and with them Spithridates, viceroy of Lydia and Ionia, and Arsites, governor of the Phrygia near the Hellespont. These had encamped near the city of Zeleia with the Persian cavalry and the Grecian mercenaries. When they were holding a council about the state of affairs, it was reported to them that Alexander had crossed (the Hellespont). Memnon, the Rhodian, advised them not to risk a conflict with the Macedonians, since they were far superior to them in infantry, and Alexander was there in person; whereas Darius was not with them. He advised them to advance and destroy the fodder, by trampling it down under their horses’ hoofs, to burn the crops of the country, and not even to spare the very cities. “For then Alexander,” said he, “will not be able to stay in the land from lack of provisions.”It is said that** in the Persian conference Arsites asserted that he would not allow a single house belonging to the people placed under his rule to be burned**, and that the other Persians agreed with Arsites, because they had a suspicion that Memnon was deliberately contriving to protract the war for the purpose of obtaining honour from the king. - Arrian, 1.12
So at least one satrap, Memnon of Rhodes, considered resistance to be futile at this stage. The rest, however, distrusted Memnon (ironically, since he seemed to be the most capable of them) and seemed confident in their strength and ability to deal with Alexander directly and swiftly. The result was the fateful battle of Granicus in May 334BCE, where the Persian satraps were soundly defeated by Alexander.
As for Tyre, it would seem that the city's leaders (who did not have the same sense of sense of loyalty to the Persian emperor as the satraps) initially agreed to cooperate with Alexander:
Thence he advanced towards Tyre;ambassadors from which city, dispatched by the commonwealth, met him on the march, announcing that the Tyrians had decided to do whatever be might command. He commended both the city and its ambassadors, and ordered them to return and tell the Tyrians that he wished to enter their city and offer sacrifice to Heracles. - Arrian, 2.15
The Tyrians, however, later decided to deny him access access to the city and the temple of Herakles within it:
To this Tyrian Heracles, Alexander said he wished to offer sacrifice. But when this message was brought to Tyre by the ambassadors, the people passed a decree to obey any other command of Alexander, but not to admit into the city any Persian or Macedonian; thinking that under the existing circumstances, this was the most specious answer, and that it would be the safest course for them to pursue in reference to the issue of the war, which was still uncertain. When the answer from Tyre was brought to Alexander, he sent the ambassadors back in a rage. - Arrian, 2.16
Thus, it seems the Tyrians were trying to maintain a pragmatic position of neutrality. They wanted to cooperate with Alexander just enough to keep themselves out of the way of his onslaught, but not too much in case the Persians re-took control of the neighborhood. The Tyrians had reason to think that they had at least some bargaining power. The island city was exceptionally defensible and had resisted several sieges in past centuries with varying degrees of success. In addition, while Alexander had previously defeated Darius himself at land at teh battle of Issus the previous year, Alexander's siege and naval power was relatively untested, and his own fleet had been disbanded after the siege of Miletus. Of course, the city's gambit proved to be ultimately foolish when Alexander successfully lay siege to with the help of the fleets of his eastern Mediterranean allies, by constructing a massive dam to the island.
Tyre was not the only city to misjudge their ability to resist Alexander. As he moved south into Egypt, at least the governor of one city thought he had a pretty good chance of resisting:
Alexander now resolved to make an expedition into Egypt. All the other parts of what was called Palestine Syria had already yielded to him; but a certain eunuch, named Batis, who was in possession of the city of Gaza, paid no heed to him; but procuring Arabian mercenaries, and having been long employed in laying up sufficient food for a long siege, he resolved not to admit Alexander into the city, feeling confident that the place could never be taken by storm. - Arrian, 2.25
He was not entirely foolish to think so. The city was well fortified and Alexander's engineers were not entirely convinced they could breach its walls. As he had done at Tyre, however, Alexander refused to be stopped and captured the city through the construction of a massive ramp:
The city of Gaza was large, and had been built upon a lofty mound, around which a strong wall had been carried... When Alexander arrived near the city, on the first day he encamped at the spot where the wall seemed to him most easy to assail, and ordered his military engines to be constructed. But the engineers expressed the opinion that it was not possible to capture the wall by force, on account of the height of the mound. However, the more impracticable it seemed to be, the more resolutely Alexander determined that it must be captured... he therefore resolved to construct a mound right round the city, so as to be able to bring his military engines up to the walls from the artificial mound which had been raised to the same level with them. - Arrian, chapter 2.25-26
So despite Alexander's great victories at open land battles, some well-fortified cities certainly seemed to think they had a chance at resisting. Although these were ultimately unsuccessful, Arrian's account emphasizes that Alexander was only able to overcome these cities with massive siege works and an unprecedented amount of ingenuity. So even though in hind sight we know nothing was able to successfully resist Alexander from the Hellespont to the Indus river, it wasn't too crazy for a few of these cities to try and hold out (even though some commanders, like Memnon, realized how impossible this would be from the beginning).