Why Did Allah Create People Who Would Go To Hell?
Knowing something does not remove free will. Rebellious are deserving of punishment, so Allah punished them. Obedient are deserving of reward, so Allah rewarded them. According to your logic, Allah shouldn’t reward people either if He knew who will succeed, hence “free will is out of question”.