God gave man free will. This is a gift that allows us to make moral decisions. When confronted with the ability to either do what's right or wrong, we are accountable for that.
God is all knowing, so despite our ability to make a choice, God already knows what we'll do.
God is all knowing, so despite our ability to make a choice, God already knows what we'll do.