Because when you are on battery life more than likely your machine is throwing on the optimization for "Better Energy Savings" which throws down the CPU's multiplier (runs slower) and shortens the spin time of the hard disk.
While plugged in everything is going full speed.