Generally speaking, there are 2 main causes. If the boot sector is infected by viruses and other malware, the bootloader and booting chain will get damaged. And the virus may then prevent Startup Repair from either running or implementing its repair normally. So the infinite loop of Startup Repair occurs.