It's actually a (pardon the pun) sound electronic principle. An audio signal is essentially an AC electrical signal. The louder it is, the greater its amplitude. The more sound there is a signal (by that I mean sound to silence ratio), the more electricity is coming out of the signal.
Based on my recollections of my electronics classes, this is probably a very refined rectifier and voltage regulator set up. Nothing special, just a clever application.
The added batteries would "fill in" the silent bits of the audio signal, so yeah, it would definitely work better with them.
I expect that at its root, this is like one of those battery operated "boost your cell phone" things that are becoming ubiquitous, but with the added twist of being able to also draw power from an outside power source: an audio jack.