My idea is "I assume at first there is no collision, and then if I find any positive case in the loop, there is collision (and I can exit now the loop)"
The problem is that you set collision to false in your loop when you encounter a negative case, but it must be set to false once before the loop only.
Even without 'break', it would work. It's just because we now know there is collision so we can skip the enumeration
The second loop works because of the "break" statement