Moses wrote the book of Genesis to instruct and show the Israelites that the God they worshiped, the God who took them out of Egypt, the God who made a covenant with them was the very same God who made a covenant with their fathers Abraham, Isaac and Jacob and that He is the one true God who created everything. Therefore He alone must be worshiped.