God being the ultimate good, wanted to give. God is also the ultimate truth.
The definition of good is giving. Justice by definition is truth.
As the only being in existence He needed to create a semblance of a separate being so that He can give to. He therefore created a void in Himself in which He could create a world, where in His created being can earn its reward. As being the ultimate good, He needs to give the ultimate good. The ultimate good is being close to God Himself. His initial thought was to create using strict justice, as opposed to tempering justice with mercy.
He could have just given to the other being, however receiving an unearned gift is not the same as receiving an earned reward and had He just given to His creation, the receiver would not have received the ultimate good, therefore He had to create a two tier world, one where the reward is earned and the second one where the reward is given out.
His initial plan was that in order to earn reward the act done would have to have been over and above the call of duty, as any action done would by the standard of justice not be deserving of reward, as opposed to any infringement would be deserving of punishment. As a comparison if a parent asks a child to do a minor task it is self understood that the child does not deserve reward for it, as the child owes the parent its existence, even more so when comparing the created being to God, any action would not be deserving of reward unless it is over and above the call of duty.
However He saw that justice alone would end up with a very short time span for this world and no one would be able to earn their reward, He therefore tempered justice with mercy and allowed His created beings the ability to repent from misdeeds and undo damage done and have another go at earning reward.
As an aside God being eternal can exist for eternity, however anything which has an end has a beginning and anything that has a beginning has an end, He therefore blew part of Himself in to man, and it this part of Him which will survive for eternity.
Good by definition is not judged by how much you give as take an example of a child who wants loads of sweets and the parents knowing what is good for the child will withhold the sweets from the child. So by not giving the child sweets they are being good for the long term benefit of the child. How do we know that God is good? How do we know that God is a giver?