Because dynamic entities don't follow collision rules like static entities. The door being dynamic.
Since the "player" you play as is just a giant, transparent, sphere, you may accidentally phase through the door, cause the zombie to see you and activate.
Now as to why he can attack, in his script, there is a "plrdistwithin", which in leman's terms means "do this when the player is within this much space of me". Now, the distance terms in FPSC is done by sphere as well. So if this distance defined in the script is greater than the distance between the player and the zombie thorough the door, you'll get attacked because you're within the sphere.