Ephesians 1:4-6, “…even as he chose us in him before the foundation of the world, that we should be holy and blameless before him. In love he predestined us for adoption to himself as sons through Jesus Christ, according to the purpose of his will, to the praise of his glorious grace, with which he has blessed us in the Beloved.”
These are truly wonderful verses. They teach that before God made the earth, He had a great plan to create a divine family. Strange as it may sound, in order to create divine spirit beings, He needed to make mankind. Through His infinite wisdom, He even foresaw that Adam would sin and that mankind would need a Savior. So, God planned to send His only begotten Son to save mankind. Revelation 13:8 (KJV), Jesus was “… the Lamb slain from the foundation of the world.”
God knew that He could use the resulting sinful world to fashion a precious church class who would be crystalized in character in Christ's likeness. This class could be trusted with the divine nature (2 Peter 1:4) because they would learn obedience just like Jesus had learned obedience – through suffering. Hebrew 5:8,9, “Although he (Jesus) was a son, he learned obedience through what he suffered…being made perfect…” So, the church is likewise developed. James 1:2-4, “Consider it pure joy, my brothers and sisters, whenever you face trials of many kinds, because you know that the testing of your faith produces perseverance. Let perseverance finish its work so that you may be mature and complete, not lacking anything.”
The church is considered blameless because we have Christ’s blood covering our sins. We are holy because we seek to do only God’s will and not our fallen wills.
To summarize: God's grand plan was to develop a holy class of divine beings to live with Him throughout eternity. Even before He created the earth, He purposed to create this class from sinful man!