My dog did the same thing when I dropped him off at the vet. The girl took him in the back and I left. I opened my car to leave and he pushed by me and jumped in my car.
The girl came running out and said that dog can open doors. I forgot to tell them that because I thought they would keep him in a cage.
We always had to keep the doors locked, or he would just come and go at will.
He is gone now, but he was the smartest and naughtiest dog I ever had.