Why did Joseph store 7 years of grain?
Yeah, you’ve already been given the verses. You’re a hypocrite.
Joseph gave the reason ... he said to his brothers that they meant it for evil but God meant it for good.
It was to preserve the LINE OF THE MESSIAH of Israel, as God had promised (to Abraham, Isaac and Jacob) and to show God’s power and wisdom to the world and that He IS GOD ALMIGHTY knowing the beginning from the end and NOTHING can thwart His will.