It seems to me somewhat as though Alexander diverted significantly from a path into Southwest Asia into Northeast Africa, and as far as I can tell he wasn't provoked by the Egyptians into war or anything; he chose to attack them.
And while Augustus conquered Egypt as a part of defeating his rival Marcus Antonius and becoming emperor, he then declared it a part of his personal territory, not Rome's.
Both of these suggest to me an intent to conquer Egypt, which I would assume is to acquire the resources contained in the land.
But what resources are these? I've tried looking online, but all I find are the resources of modern Egypt, such as oil and gas (largely undiscovered and useless to the ancient world), or else basic claims about Ancient Egypt's resources being the fertile Nile and copper.
Two things: Ancient Egypt was... ancient. Even in the Archaic and Classical Greek Periods, long before building the Colossus of Rhodes or the Mausoleum of Halicarnassus, the Pyramids had already stood for THOUSANDS of years. There was a sense, in the Mediterranean World, that Egypt was the eldest of all civilizations and that its ancestry should be respected and its cultural heritage incorporated in your own. Egypt was also one of the first world empires of the ancient world, culturally and economically dominating most of the Mediterannean in its heyday. Its God Kings were legendary. Not just the Greeks and Romans, but earlier the Assyrian, Babylonian, and Persian monarchs contended for supremacy in the Levant and laid successive claim to Egypt's ancient bones. By the time the Greeks, and later, the Romans, were ready to lay claim to massive empires, Egypt's cultural heritage was incredibly revered, and both Alexander the Great and Augustus took pains to be recognized as true pharaohs so that they could claim some portion of that reverence for themselves. (Later Roman Emperors did not need to do this. By Augustus' death the Roman Empire had already become a titanic force in the region with a legacy that rivaled, and would eventually surpass, Ancient Egypt's.)
Secondly, Egypt was probably the greatest source of independent wealth in the Mediterranean. If you remove trade routes from consideration then it definitely was, because Egypt, almost alone out of all other regions in the Mediterranean/Levant prior to the Roman Climate Optimum, reliably produced far more food than it needed. In a world still dominated by subsistence farming, the exportable food that Egypt produced was pure money. The Egyptians could sell their excess grain at high prices. Every major power in the region sought to dominate Egypt so that they could control this massive source of wealth. Augustus, who famously suffered constant money troubles until his defeat of Antony, converted Egypt into a personal posession both so that he could directly administer it (taking its vast wealth for the Imperial coffers, a boon which allowed him to finally balance his income and expenditures while simultaneously maintaining 22 legions and a host of auxiliary troops), and to deny any possible powerful rival from his own class access to that wealth themselves. He famously banned all members of the Senatorial class from travelling there except by his permission, a restriction that lasted long into the Imperial period.