delay_ms not as expected

Why is that strange behaviour? (rhetorical question, hint, it isn't)

In the code that 'doesn't work', you only have one delay, so as soon as the output was disabled, it gets enabled again. In both version that 'work', you have two delays, one after the enable and one after the disable.