Look at the Judaeo-Christian myth of the "first people". What happened to them? They got booted out of the garden because they ate something - some food.
Why were they forbidden to eat the fruit? It was apparently a fig-tree, let's think about these fig things for a sec.
Imagine an early people who have a resource available - a grove of wild figs - and also that they don't know much about agriculture, or horticulture. A bit of rationality should lead to the desire by this group to preserve the resource - they don't want members of the tribe going there and helping themselves, or the fig grove will get used up, the resource will disappear.
We must have had some kind of early agricultural/husbandry ideas; one of which I imagine was awareness that things like fig trees have to be husbanded, "don't eat all the figs, or there won't be any seed stock", etc.
Adam and Eve were transgressors - they broke the group rule, about going to the big fig-tree; they go and help themselves to the "sacred resource", which has cultural and ritualistic strictures, they are guilty of transgression against the group. They get ostracised, they feel shame.
What do they do about their shame - their inability to make any reparation to the group, because the group has cast them out? They notice their own nakedness, they appease their shame and guilt by covering their genitals.