Would it really bloat the compiler to keep value of the variable after loop through?
You should learn some Assembly for better understand it. How much it bloat is not very important here. The most important thing is the case you mentioned is very rare. Even if it happens, you can easily set the value to another variable. Let the looping variables be used for looping only, this short advice seems trivial, but this is an important thing a professional programmer should do: write a clean code.
Some of my codes in BASIC depended on the looping variables at the end of For-Next, they worked properly. But if I compare them with my Pascal codes now, they are ugly. Now my codes in Pascal code have variables for looping, variables for calculation, etc. Each of them performs their own task. Nice. No more messing up like my old codes in BASIC.
Also as explained by MarkMLI, this behavior was already set in the past.
I think it’s possible to change the loop variable within the loop ...
Then you should use
Repeat-Until or
While-Do statements instead.
Also if “i” was used inside a while or repeat until loop the values assigned Therein would not be undefined..
The looping variables in For-Do are optimized for performance, some rules need to be applied. It has been explained in the past. So let looping variables be used for looping only. While-Do and Repeat-Until are not so optimized, as far as I know.