There are different criteria that determine the outcome of events. Either one is prioritized or not, the other being essential to society’s functioning despite evil character. Or one is more important to God due to their holiness. Lastly, God’s chosen one’s as Israel was, were prioritized by God many times, leading to victories determined by God. It is also possible to lose or carry the consequences despite being holier, as God knows the holy can handle the burden of the other.