It's a debugging technique. A valid one in many cases, but especially:
- when your code needs to run in real time and will break if you pause it in a debugger
- when you're running repetitive operations and using a debugger would be tedious
- when you're developing for a platform for which there's no debugger (embedded/bare metal)