We live in a broken world, things happen all of the time, God also gives us free will. If a guy robs a bank, that's his choice, if God were to stop him, that would be against his promises of free will.
However, actions are not without consequences. In the verse that you gave, it said God sent his people to kill them as a punishment for doing wrong. If a parent tells their child not to play with matches, but they do it anyway, is the parent unjust in punishing them? No, it's what you would expect, otherwise, they could likely burn the house down or severely injure themselves.