Your issue could be one of the following:
1) Improper head unit wiring
--If the main power wire for the head unit is connected to a power source that is always hot, the radio won't ever turn off.
Fix: rewire the radio to receive power from a source that is only hot when the ignition is in the accessory or run position.
2)Ignition switch problem
--If there is a problem with the ignition switch or cylinder, accessory power may be available even when the key is removed.
Fix: check to see if accessory power is available when the key is in the off position. Realign the cylinder or replace the ignition switch as needed.
3)Worn out key or ignition cylinder
--If your key or ignition cylinder are especially worn, you may be able to remove the key when the switch is still in the accessory or on position.
Fix: make sure that the ignition switch is actually in the off position in the short term, and replace the cylinder when you can.