This is for readability. This temporary `$contains` variable + the loop etc, it would be way more clear to have a call to a `containsProduct` method here.