Even though this is is a DC circuit, the ripple is causing an AC component. The bypass capacitor is helping to reduce this AC component. The ripple current acts like an eddie or backflow in the circuit. As the fluctuating voltages and currents propogate through the circuit, differences in voltages and currents can occur that cause the circuit to fail. For example, assume that a AND gate is holding its state because the semiconductors that make up the gate are in a stable state.
Transistors work by currents flowing one direction through the gate.
If the current stops flowing, the transistor shuts down. If a ripple current comes through where the current momentarily flows the wrong direction, the gate will shutdown, and you will see a change it its output. This can cause a cascading failure, because one gate may be connected to many other gates. To summarize, the bypass capacitor is used to dampen the AC component of your DC circuits. By installing bypass capacitors, your DC circuit will not be as susceptable to ripple currents and voltages.