Usually, that cough is when the engine fails to fire off to continue the 4 cycles of internal combustion.
When the rotating mass doesn't get enough inertia to continue rotating (no ignition of fuel mix), it will stop rotating, usually before the high compression stroke.
In your case (probably), the inertia was just enough to get the rotating assembly into the compression stroke (blind luck) and the compressed, unburnt fuel mix was released either out the intake or sometimes the exhaust, depending on cam/valve overlap position.
In a nutshell, you didn't engage the electrical starting motor enough to complete the ignition process. Quite normal.
On a kick start Harley (and other bikes), that compression stroke would kick the starter lever back up, sometimes throwing your shin into the foot peg or even kick you in the back of the leg/knee if you didn't have a heel on your shoe to hold the kick starter on your shoe.
Electric start motorcycles are for "wussies" with a "P".......... Says my old Shovelhead buddies.