I assume you're talking about it going down when you RE-PLUG your headphones/aux jack, right?
When you plug in your headphones, the volume you set before unplugging them is the value stored for when you plug them again. "Unfortunately" the system has some safety settings in place, and it won't let you 'store' a volume that's higher than the safety level it's been set (remember the cute little warning pop-up when you crank it up beyond about 3/4? That's the threshold). I guess if you root your phone you can change this threshold, but there's no way to do that with stock software.
BTW, Same thing applies to loudspeaker volume. The last level you have set before you plug in your headphones is the same level it'll return to when unplugging them.