Because you have the stop button OUTSIDE your loop.
Of course it does not stop that while loop, since that stop button is outside of that while loop. You need to understand data flow: when your VI starts to execute, that Stop button value is only read once, and never again. So the stop condition can never get True.
By the way, you should go through the Core 1 tutorial, and learn how to design a proper State Machine, which would result in a clear and logical code. The best indicator of "design went Mad Max" is when you see lots of Flat Sequence structures and multiple Stop buttons in a VI (and when it is so big, that I need to buy a new monitor to see the whole block diagram).
Move the Stop button's terminal inside of the while loop and wire it to the Loop Condition.
Having the terminal outside of the while loop causes LabVIEW to read the value once at initial execution of the VI. The while loop will always read False on the wire whether the button is pressed or not.
Having the terminal inside the loop makes LabVIEW read the current Boolean value at every loop iteration.
Break, step, and probe to see this in action.
I've tried to put it inside and it is not working. I've put it outside because I saw this tutorial in labview and it is telling to put the stop button outside the loop.
I have another version of this program with state machine, but my professor likes to use this version, so I have to fix it.
ah Ok. I didnt understand it well. Anyway, I've moved the stop button and it is still not iterating the loop. I think it is stuck at that structure near mover button. I've tried to put the stop button inside but it worked once and then it was not working again.
Quite frankly your code is just wrong on so many levels the stop button is the least of your worries.
Granted it may work but as this issue has shown, you really need to learn the basics before you tackle a program of this magnitude.
Here's a big list of free online training
Move the stop button control to inside the while loop. This way the while loop will look and read the button control on each loop iteration (see image attached). They way that you have it it will only read the button control once when the .vi starts the while loop section of the .vi