Yes it is illegal. You had physical control so pay the fine, pay the time then move on with life.
in the state of washington, if you are behind the wheel or with the keys in the ign. you can be charged with that, next time dont be behind the wheel of the car or have the keys in the ign. or in your pocket.
If you can prove the car was undriveable at the time (no transmission for instance) you can win the case.If the engine was running for warmth, why did the car not work?