Can some one please explain why is there a While(True); at the end of this program?

Means, forever.
This means that the loop function will essentially run only once.

If this is what the programmer wanted, then all of the code should have simply been in setup().