The reason is that as you power up, pins 8 and 9 are normally off.(There is no power connected) In this position, this is ON (the pins on a PC are normally high in use (i.e. high is off). Therefore, if you connect the power to your relays before the computer is fired up this will happen.
The safest way (if you read your Mach blurb) is to turn on the PC and let it run up, select Mach 3, and when this is on the screen, then turn on your machine and accessories.
I must admit this is easier to preach then practice, although my VFD, an Omron, flashes an alert if both CW and CCW pins are on simultaneously.