When the sun was directly overhead in Syene, why was it not directly overhead in Alexandria?

Because the earth is not flat.