The function of the history contained in Genesis is to provide a prologue and foundation of the founding of the nation of Israel and the giving of the law in the book of Exodus. It recounts how God chose Abraham and guided his family as his special people.