Windows 8.1 Boot Camp automatic repair loop
If you did not use the Boot Camp Assistant to install Windows, then you likely installed Windows 8.1 in UEFI mode, which neither Apple nor Microsoft support on a Mac.

If you don't want to use the Boot Camp assistant, then the trick here is to have created an empty FAT partition on the drive with Disk Utility BEFORE you attempt to install Windows.  Disk Utility will create a hybrid MBR on the disk, and the presence of the hybrid MBR causes the Mac firmware to use BIOS emulation which is required for Windows to run correctly.

The use of Windows 8.1 in UEFI mode on a Mac is possible, but it's asking for trouble and you should only run it that way it if you really know what you are doing.