Genisis through Deuteronomy were all written by Moses. It is curious that Moses could write about people and events where he was not present. Take Joseph and Potiphar's wife. Nowhere in the account were there witnesses yet, Moses knew of Joseph's faithfulness, as well as the intents in the heart of the unfaithful woman.
Two years ago my Seminary students found this to be startling, that others could see their doings even without being present. But I find that in the knowing, I have greater resolve to choose the right. Our works will ever be known. Therefore, may we rise up and live up to our heritage, that befitting sons and daughters of diety.