I've long thought this was the most interesting part of the story. And I might have an answer to it, now that I've read some of what scholars have to say about this account. BU2B, you mentioned that you can't hide from God. That's true of the Christian God, but not the YHWH of this story. In this story, they DO hide from God, right in Genesis 3:8! Now, a Christian will say that God was just asking Adam to account for his actions, and that he already knew very well where they were hiding. But if you are honest to the text itself, here's what you find:
- Unlike the abstract, hands-off account of chapter 1 where Elohim creates the earth as we know it, the YHWH of chapter 2 is a hands-on God. He "plants" the Garden of Eden, he "forms" man from the earth like a potter, and "blows" breath into his nostrils. He "walks" through his Garden daily according to chapter 3.
- When YHWH is taking his daily walk through the Garden in 3:8, Adam and Eve 'hide from his face in between the trees of the garden'. This confirms that YHWH is in the Garden with them, on foot, at their level (more or less). In 3:9, YHWH "kept calling to the man" to find him. Does he find him? No! In verse 10, Adam "finally" speaks up and comes out of hiding with Eve. It's not clear whether YHWH would have found them otherwise.
Guess what? This god, YHWH, is a very powerful man, a deity in human form! That was the conception that the writer of this story (or the original tellers of the story when it was conveyed orally) had in mind. He did not live full-time in heaven (actually it was the sky, in the language of the early Bible writings, not some immaterial realm), and he was corporeal.
So, let's ask the question again... what's the purpose of the fig leaves? Who were Adam and Eve embarrassed to be seen by? It was YHWH! They felt exposed and indecent in the eyes of their creator. While a Christian cannot conceive of being embarrassed to be seen naked by their God, that's because they assume omnipresence or omniscience. So God can see you while you're in the shower, he saw you when you were born, etc.
But the god of Genesis 2 (from verse 4 on) is a limited god, of the sort that ancient polytheistic people believed in; he couldn't see you if you simply had trees to hide behind! So to be in the physical presence of this god had personal meaning. It wasn't just that God had temporarily formed a body to interact with Adam and Eve, a mere avatar for his all-seeing presence; no, that was God! No wonder Adam and Eve were embarrassed to be seen naked in the presence of YHWH.
The underlying implication, by the way, is that Adam and Eve were originally child-like. Children don't "know" they're naked. It's not until they hit puberty that they begin to become self-conscious physically. That time of puberty means a loss of "innocence" as the mating instinct begins kicking in, which leads to a new awareness of the significance of nudity, and it seems to correspond to what happened to Adam and Eve's minds when they ate the fruit of knowledge.