After Adam and Eve ate from the forbidden tree, they realized they were naked, literally and spiritually. So they attempted to make clothes from leaves, but failed. So they hid from God. God knew where they were, but he allowed them to hide from him and searched for them. Why? The answer says something profound about God.