There was no food in the land because the famine was so severe. The land of Egypt and the land of Canaan dried up from the famine.
Joseph collected all of the silver to be found in the land of Egypt and in the land of Canaan for the grain, which people came to buy, and he deposited it in Pharaoh's treasury.
The silver from the land of Egypt and from the land of Canaan had been spent, and all of the Egyptians came to Joseph and said, "Give us food. Why should we die before your eyes, just because the silver is gone?"
Joseph said, "Give me your livestock, and I will give you food for your livestock if the silver is gone."
So they brought their livestock to Joseph, and Joseph gave them food for the horses, flocks, cattle, and donkeys. He got them through that year with food in exchange for all of their livestock.
When that year was over, they came to him the next year and said to him, "We can't hide from my master that the silver is spent and that we've given the livestock to my master. All that's left for my master is our corpses and our farmland.
Why should we die before your eyes, we and our farmland too? Buy us and our farms for food, and we and our farms will be under Pharaoh's control. Give us seed so that we can stay alive and not die, and so that our farmland won't become unproductive."
So Joseph bought all of Egypt's farmland for Pharaoh because every Egyptian sold his field when the famine worsened. So the land became Pharaoh's.
He moved the people to the citiesa from one end of Egypt to the other.
However, he didn't buy the farmland of the priests because Pharaoh allowed the priests a subsidy, and they were able to eat from the subsidy Pharaoh gave them. Therefore, they didn't have to sell their farmland.
Joseph said to the people, "Since I've now purchased you and your farmland for Pharaoh, here's seed for you. Plant the seed on the land.
When the crop comes in, you must give one-fifth to Pharaoh. You may keep four-fifths for yourselves, for planting fields, and for feeding yourselves, those in your households, and your children."
The people said, "You've saved our lives. If you wish, we will be Pharaoh's slaves."
So Joseph made a law that still exists today: Pharaoh receives one-fifth from Egypt's farmland. Only the priests' farmland didn't become Pharaoh's.