I would agree that using a while loop sure is the better idea as i consider it bad habit to manipulate the loop control variable.
But I was surprised about the result - that's sure not what I would have expected

Unlike other programming languages in Mathcad altering the loop control variable within the loop seems to have no effect on the working of the loop. It's like the "i" on the left hand side runs in a different context as the loop control variable "i", similar to local vs. global worksheet variable.
BTW, Prime shows the very same behaviour.
If for some reason you need a for-loop and omit steps if a certain condition is fulfilled, then you can use "continue".
To skip step 6 and 7 (which obviously was your intention in the example) you could do it that way

Or you may provide the step numbers to be omitted in a vector
