الَّذِي خَلَقَ الْمَوْتَ وَالْحَيَاةَ لِيَبْلُوَكُمْ أَيُّكُمْ أَحْسَنُ عَمَلًا ۚ وَهُوَ الْعَزِيزُ الْغَفُورُ – 67:2
“[He] who created death and life to test you [as to] which of you is best in deed – and He is the Exalted in Might, the Forgiving” Quran 67:2
Allah says that He will try us. He knows what we will choose but has left the choice to us. He does not force us to do right or wrong. This is a test that we must pass.
As far as creating man perfect and then having him perform circumcision could be a test to see who follows the command to perform this from those who do not. Also, this act protects one from being unclean.
Allah created fingernails for us but we have to clip them, Allah created hair for us but we need to trim it eventually, etc.