Everyone in the world was wicked and evil except for Noah and his family?
As the story goes.
How did that come about?
I don't know. The story starts out Adam and Eve were deceived and disobeyed a command. It then went to one of their children killing his brother and the behaviour continued on from there. We are told every inclination of the human heart is evil from childhood.
Is God incapable of guidance?
I am incapable of knowing that.
Are people incapable of learning?
The story suggests it's a matter of conscience rather than ability to learn.