I've had several atheist and agnostic friends and acquaintances over the years bring this up as a reason or as "evidence" for them that God doesn't exist. However, I noticed something about their lives after they used this argument as to why the existence of God doesn't make sense. When basically put in the same position as God was before he created humans, they did the same thing God did.
All of these people who used the above reasoning to not believe there was a god had kids. I asked them if they had such a problem with God knowing all He knew about humanity before He created them, yet made us anyway. Then why did they decide to go ahead and have kids, knowing all they knew about human life? They knew that once that child was born, that child would experience his/her parents dying, possibly a death via cancer, bad car accident, etc. They would be brought into a world filled with pain, violence, corruption, death, heartache, heartbreak, and ultimately their death. So, if the parents knew all of this before having children, why did they bring that child into this world? If it didn't make sense for God to do it, then why did they basically do the same thing? Why subject that child to having to watch his parents die, other loved ones die, then ultimately, them dying?
Not agreeing with how someone did something isn't the best method for determining their existence. But that's just my opinion.