Well, I would imagine that it takes a line-out signal from the dock connector and then runs that to a headphone amplifier. The volume controls probably change the gain factor applied by that amplifier, so I'm not too surprised that this works.
Changing tracks requires communication with the iPod via the Apple Accessory Protocol, so we shouldn't expect that to work.