Often, people look at the test of the Tree of Knowledge in the Garden of Eden as an example of the arbitrary laws of God. Laws, they say, ought to be for our protection, and make sense with the laws of nature, and so on, whereas, just simply eating a fruit (not even one that was particularly poisonous) is completely random. Why should they have been forbidden to eat the fruit of one particular random tree? Therefore, God is arbitrary and harsh, and only wants to display tyrannical qualities, etc.
This leads to the question: Is it fair for a parent to test their child's obedience? We can safely assume that most parents would agree that complete obedience to their word is best for their child, so that they will know that if they yell, "Get out of the street!" their child will immediately respond and obey, not a second too late. Therefore, parents spend most of their children's young lives training them to be obedient to them. But a random test, as random as the seemingly useless tree-test, just to see if they will obey?
Perhaps one answer lies in the context of Adam and Eve's test, compared to the surroundings of every child since. Quite simply, Adam and Eve did not have traffic, and there were no cars to get out of the way of. They had no hot stoves, no swimming pools to drown in, no poison on their shelves, or sharp glass objects to break. In fact, they had no other dangers that God had to train them to stay away from, because it was a perfect sinless paradise. However, parents today have all of those dangers and many more at every corner to use as practical training in obedience. There's no need to think up any arbitrary test of faith or obedience when our children are constantly exposed to dangers all around, whereas God had to think up something to see if His new people would take Him at His word.
Now, after 6,000 years of evil in the world, we know something very clearly that Adam and Eve did not know at the time: if we run too fast in the yard, we could trip on a rock and scrape our knees up real good. But there might just be other dangers beyond our comprehension, dangers only God really knows about, dangers beyond our street and our medicine cabinets and our hot stoves. Those are the dangers we just have to trust God to know about--and again, just take Him at His word.