The Zohar asks that as the intent of God in the creation of the world was to do good to His creations, why didn't he just create a world of unlimited, and free, pleasure. Why did he set up a system of commandments, and the consequent reward and punishment that flows from following the comandments or failing to do so? The Zohar answers that this is due to the fact that one who receives that which is not his, is ashamed to look in the face of his benefactor. There is a factor of shame in receiving something which one does not deserve. In order to negate this shame, God created this world in which one can work and thereby deserve the ultimate good as a form of reward of which he is deserving.
Some time ago I explained this principle to a student of mine, and he was dissatisfied with the answer. Why, he asked, didn't God just create a world in which people wouldn't be ashamed to receive something they didn't deserve? Had He done so He could have then just given unbridled pleasure to all His creations without the need for commandments and all that entails?
The Baal HaSulam explains this concept as follows. Every branch tries its best to emulate its roots. The branch will attempt to duplicate those things which exist in the roots, and to distance itself from those things which are not in the roots. This is true throughout creation in all places where you find relationships between sources and their offspring.
As God is the root of all creation, and specifically of mankind-the purpose of all creation, those things which are found in God are pleasant to us. They are the things which allow us to feel conected to our source. Those which are not found in God go against the grain and are difficult for us to accept.
It is for this reason that we like rest more than movement, to the extent that all of our movement is ultimately for the purpose of being able to rest, and we appreciate wealth, strength and wisdom-which are all present in God, more than povery, weakness and foolishness.
With this we can now answer the question of my student. God is only a giver, He is not and cannot be a recipient. It is for this reason that we always feel better giving, than we do receiving. God created a world in which we can feel like we aren't just receiving but that we are givers also, by doing what he has asked us to do. This was in order that when we receive from Him we should not feel that we are just taking something which we have not earned, and can feel to some extent connected to the manner in which God conducts Himself.