I currently live in Missouri and work in Kansas. Kansas taxes were deducted from my paychecks. I live less than 1 mile from the state line. Why am I paying Missouri taxes if I am not working there?

Additional info:  I was contributing a small amount out of my paychecks to MO in anticipation of being taxed, but the amount owed seems astronomical for not working there.