unlike control_repeat, control_foreach's input is re-evaluated every iteration, so by plugging in a constantly increasing value (in this case, i+1) you can make it run forever. I'd imagine that this could cause some interesting bugs where you use a variable to initialise a for loop, then change the variable's value in another thread (because that seems reasonable, for instance you might reset it to 0 in preparation for something) and have the original loop run for too few or too many times.
Dango dango dango dango dango