Because it wastes memory and decreases performance, that&#x27;s why.<p>If there&#x27;s a section of code in your function that may or may not be executed, depending on a conditional, then allocating the memory for variables used within that code block will be a waste if you end up not executing it.  Now, you could argue that that block should be turned into a separate function, but now you&#x27;re doing another function call (unless it gets optimized out) which wastes performance, and you&#x27;re making the code more cluttered if the code block is relatively small and not really worth turning into a separate function.