The Western/Libyan Desert is 1000 km north to south and 1000 km east to west and largely blocks access out of the Nile and Nile Delta.
As we saw in the WW 2 desert campaign, the Western Desert makes even mechanized and motorized maneuvering problematic.
Before modern nation-states, the control of such large barren areas was very rare and often only nominal. If you go due west from the heart of ancient Egypt, you run into the "Great Sand Sea', which is exactly what it sounds like. Places like this have no pre-existing infrastructure to conquer, and there is no way to build a meaningful infrastructure either; there is simply nothing to support a sedentary population.
The only parts of North Africa that could have conceivably been conquered would have been along the Mediterranean coast. But why did they not conquer these areas then? Well, the Egyptians were not a particularly naval people, and he only large seagoing ships that the Egyptians used were for commerce. Also, inhabitable land along the north-African coast is somewhat segregated, thus discouraging any king of land invasion. The closest arable land west of Egypt would have been on the Marj Plain, near modern-day Benghazi. Between there and Alexandria, there's a whole lot of desert to dissuade invaders.
Also for what it's worth, the Libyan Berbers who inhabited this area weren't wilting daisies. They were so aggressive in fact, that they managed to install a dynasty in northern Egypt, the Bubasites, for 200 years. So perhaps it was not just geography that suppressed the ability to conquer North Africa.
From a geographic stand point most of the land immediately west of the modern day country of Egypt is mostly desert. The Ancient Egyptian empire was almost primarily based around the Egyptian river and would have been fertile and habitable land. Anything outside of that would be illogical and extremely difficult to live in.