In ancient Egypt, temples were not just religious places but economic ones. Think medieval monasteries. Depending on their size, ancient Egyptian temples could own large tracts of land, be local or regional hubs of trade, and could command the labor of dozens to thousands of people. This meant that temples needed bureaucracies to keep themselves running. Bureaucracies mean scribes who could write, and the records they wrote. Which is why historians love ancient Egyptian temples.
Pharaoh Neferirkare Kakai, third pharaoh of the Fifth Dynasty, had a lovely temple to the sun set up. Some of its records survived to be studied by modern historians. They demonstrate that he might have been pharaoh, Neferirkare Kakai still had to deal with the hassle of unreliable suppliers, just like modern-day corporations. To quote Wilkinson’s The Rise and Fall of Ancient Egypt:
Deliveries of foodstuffs and other supplies were also meticulously recorded, but here again there were systemic failures that even the most assiduous record keeping could not mask. Among the commodities due each day at Neferirkare’s sun temple were fourteen consignments of special bread. During one year, none arrived on the first day of the month, none on the second, and none on the third or fourth, until on the fifth day of the month seventy batches were delivered in one go. The next six days’ supplies failed to materialize at all and seem to have been written off. By contrast, the next eleven days’ deliveries were received on time.