Question: why hey siri only when plugged in?
Answer: You can enable Low Power Mode in Settings > Battery > Low Power Mode. Doing this will achieve the desired effect ("Hey Siri" works when plugged in, but not cord-free), however the scope of Low Power Mode is wider than just Siri. You might not mind that if you are trying to conserve battery life.