The problem is the alternator. As the alternator’s rotor goes round and round, each time a pole (winding) is passed, a burst of electrical power in the form of voltage and current gets generated. It works sort of like what would happen if you took a can and three tennis balls and removed one of them, then shook the can back and forth. The analogy of the tennis balls bouncing off the ends of the can, a similar effect is what produces the burst of electricity in the alternator.
So the alternator generates electricity in a series of electrical bursts, fits if you will, rather than what would be more desirable, a more or less constant voltage and current output. If you hooked an o-scope up to the output of an alternator (sans battery), you’d see this happening on the display, and it wouldn’t be pretty. There’d be large voltage and current spikes everywhere.
The car battery sort of smooths the alternator output, making it more or less constant, suppressing the alternator’s electrical fits of bursts of power. Most electrical power supplies – for example the one in the computer you are using – use a capacitor for this same reason. And a car battery represents one huge capacitor. It’s there anyway, so the car engineers just decided to use the battery as the capacitor for taming the alternator.
Running the engine w/out the battery connected, the risk is that the alternator’s voltage and current spikes could damage anything connected to the alternator output, which is pretty much everything, including the car’s computer circuitry and ignition components. All or most of those components have their own capacitors for protection against power spikes, but those capacitors have limits to how much they can take. Without the car battery, its a much iff-ier situation.