Almost all the simple 8051 programs I have seen so far ends with the code
LOOP: SJMP LOOP
.
From my understanding I think the above instruction creates an infinite loop by calling the same instruction again and again. But what is the purpose of having infinite loop at the end of a program and if it keeps running again and again then when does the program gets terminated.