I think we still have to explicitly write why the line is displayed.
Without defining the scope, the PHP statements act only on the next statement. I.e,
if (false) echo 1; echo 2;
Of course, this code will only output 2.
If we need more operators to be in scope, it should be explicitly defined.
if (false) { echo 1; echo 2; }
This code will not output anything.
But the question remains, why PHP did not perceive the HTML output operator, which, it seems, goes the very first after the condition. The answer to this question was given by vp_arth - because the closing PHP tag acts the same as an operator limiter. That is, as a result, the author obtained a condition acting on an empty operator:
if ($shop == "close") ; # ^ оператор видишь? И я нет. А он есть!
and further code is not under its effect.