As a military spouse who worked in a different state than my residence, why am I being charged state taxes in a state I didn't work in?

My husband is stationed in VA. I got a civilian job. Our state of residence is IL. Why do I owe IL taxes? We haven't been in IL for 2 years.