Allah (SW) guided all His creatures to the Right Path and warned the human beings from wrong deeds. He also helps those who want to do good. Allah does not force people to do good nor does He force them to avoid bad. Human beings are granted intellect and free will and been asked to do good and avoid bad. If Allah forces people, then the whole matter of good and bad in our life will go away and differentiation will be impossible between good people and bad people. That is the Justice and Wisdom of Allah (SWT).
Wassalam.