For 4500 years, the Egyptian pyramids of Giza have loomed over the western bank of the Nile River as a geometric mountain chain. The Great Pyramid was built to commemorate the reign of Pharaoh Khufu. It was completed around 2560 BC.
To construct the pyramids, huge resources in the form of labor and food items were used. The successful completion of pyramids took place because of the surplus production of labor and food grains in the economy.
In the Indian context, the Upanishads were developed in around 700 BC. What are Upanishads? The Upanishads are the philosophical-religious text of Hinduism. The Upanishads were also the product of surplus labor and food grain in the economy.
By the time of 700 BC, the big Mahajanapada i.e. empires were developing. These empires were able to generate surplus production in the economy. So there was no need to all men and women to do the regular hard work. A large number of talented people were now free from everyday mundane work. As they were free from everyday mundane work, they started to speculate about God, Spirit, Universe, and Life After Death. That speculation led to the development of philosophical thought in the form of the Upanishad. These Upanishads were intangible things.
Similarly in Egypt in around the 3rd millennium BC, there was growing surplus production in the economy. This led to surplus labor in the economy. This surplus labor was employed in the construction of pyramids – which were nothing but the thrust for philosophical knowledge. The pyramids were tangible things.
To conclude, it is very difficult to explain how the divergent route i.e. Upanishad and pyramid – had taken place, though the process of surplus production was the same.