Because for readability and thus understandability and maintainability the important stuff should come first. A trailing if that determines if anything is performed at all makes the code much harder to understand because when you reach the if you have to revise your entire mental model of the statement to that point.
Somewhat like the infamous instructions for disarming a bomb:
In reply to Re^3: why not listed foreach and if?
by GrandFather
in thread why not listed foreach and if?
by vincentaxhe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |