Before eating from the tree of knowledge of good and evil, there was no right or wrong. Adam had free access to the Tree of Life (sex). Upon reading the devil's book of lies about right and wrong, and upon believing them to be true, Adam lost free access to the Tree of Life.
The devil's book told them they ought to be ashamed of their nakedness, and so they were.