Tow Truck Crimes

I am a tow truck driver. I responded to a scene of an accident on interstate 76 from a police scanner I have in my tow truck. The police officer on the scene ordered me to move a car that had just been in an accident out of the line of traffic and over to the shoulder. I did that. Afterwards, it turned out that it was an avis rent-a-car. Avis appeared on the scene and demanded the car back. I asked for $100 for the service fee for moving the car. Avis said no that they did not authoirze the tow of their car and never made an agreement. I told them the police officer ordered me to do it and now they had to pay for the service. They refused.
I drove the car to my impound lot. They appeared and demanded the car back I told them that they now owed me $400; $300 for the tow to the lot and $100 for the on scene tow. They refused.
Avis called the police and I got arrested for felony theft of the car. How can this be a crime?
You are not guilty of stealing the car. In order to be guilty of stealing the car, you must have the intent to permanently deprive the owner of the car of the car itself. You had no such intent. However, you maybe guilty of theft of services and/or theft by deception of $400, which is a misdemeanor. No one asked you to pull your tow truck over to the side of the road. You had no contract to do that. You put yourself in that position.