You can use while(true) for a daemon (although there are definitely better languages for it), or a similar scenario, where you may want the script to run indefinitely.
Alternatively, while can be used with a predicate, or executing a function each time to check for a property.
while(functionCanExecute($someVar)) {
//Do Stuff
}
This will be evaluated initially, and after every loop, to check if the while loop should run again.
Their underlying functionality may be very similar/the same, but there are certainly scenarios when it's easier to use one over the other.