Imagine that you’re the administrator of a temple in the ancient middle east in the 4th millennium BCE. Your city is almost entirely focused on agriculture. There are 50,000 people within your walls, and they all need to eat. In order to make sure that everyone gets food commensurate with their position, you pool all of your agricultural products, grain, meat, beer, milk, goats, cows, and more, in your temple at the center of the city. With all of this stuff coming in and going out all the time, you need to develop a system of keeping track of everything.