God did not create imperfect beings, for, when we were created, we did not know sin. It was the Serpent, the Tempter, who led man and woman to sin and therefore, become imperfect.
You may then suggest that in forming man, God should have made us without choice, to keep us from sinning. To that, I would argue that, as we are made in God’s likeness, we must be able to choose. God is perfect and free from sin, because He chooses it, He wills it. We were made in the same image, but we fell into temptation.