Have you an idea what the reason could be? I mean.. I just do nothing other than looping and waiting for a key input.
that code is not "waiting" for a key input.
pygame.event.wait waits for input, pygame.event.get checks for input, and continues if there isn't any.
So the code is "looping while checking for a key input"