Why did God create us?
the God created us so that we humans admit that his power and unlimited strength . All animals, plants and materials of the universe and so do the angels are forced to do what they do and are forced to declare his power by the fact that they apply his laws without hesitation or delay , even the electrons in the atoms are working with the laws he made for it. in humans the situation is different, we are not forced to believe that the God is the creator of every thing we are capable of having a free opinion about this case. what the god wants from us is that we think and research and then make our final judgment that God is there. prophets are simply a hint to tell to guide us to this fact.
then why don't the God show himself to us?
because if he did all humans will simply believe and that is not his aim. he have angels and creatures that believe in him this way but what he wants is as I said before is that he wants us to find this facts ourselves. If a you are intelligent and want the people to believe that you don't put a gun in their heads and order them to admit that you are intelligent no the correct way is to ask them to examine you give and give you hard questions to solve. only than they can be really convinced you are intelligent.
Why the God don't punish humans instantly for their mistakes and force justice?
because if he did so life will be meaning less. we will simply be machines nothing more we will be another type of angels how is even not as strong as the true angels. but the God wants us to decide for ourselves.
If the God give us the ability to choose why he will punish who choose wrong?
If you are a teacher and you gave your students a simple exam for ex 1+1=? if a student answer 3 this doe snot change the fact that 1+1=2 and the one how don't know this should fail