The 12V is going into the regulator and is being "chopped up" to make 5V. So while a SLA is better than a transformer, you still need to filter after the regulator.
Just a couple of corrections to the above discussion -
A 7805 is not a switch mode power supply (SMPS), so it doesn't "chop up" the 12V. It regulates it down to 5V. The 7805 contains a current source, voltage reference and error amplifier to maintain the output at 5V for an input of approx. 7V to approx. 30V.
One problem with running a 5V regulator above 15(ish) volts is the internal heat generated. A rule of thumb I was given was that the input voltage should be no more than 2 times the output voltage (when operating close to 75% max. current) to keep this loss to a minimum.
My understanding of the 7805 regulator capacitors are:
Input Capacitor - To smooth ripple on the input voltage, especially if from a half-wave rectifier. Even a full-wave rectifier will have a small ripple voltage.
Output Capacitor - To improve stability and transient response. Sudden switching of high(ish) current loads can cause the output to dip slightly if not kept up by this capacitor
Have built/noticed on some 7805 circuits for microprocessors, 100n caps from input and output to ground to provided added 'noise' filtering on the supply lines.
Hope this helps the discussion and understanding of linear voltage regulators.
Cheers