I appreciate all the responses. Thank you.
I don't have the remote start package, and I was out of the car less than a minute. I also know for sure, that I didn't hit anything that could lock the door.
The car doesn't have an "auto lock" feature.
I was doing a google search, and found that this has happened to many others, and the common denominator was it happened when the temperature was especially cold. We just had a big snow yesterday, it was 5 degrees earlier today when it happened. I had left my car outside on my driveway last night, and today after clearing snow off the driveway, I backed the car into my garage. When I got out of the car to check the clearance, the doors automatically locked. I got my wife's remote, and the doors wouldn't respond to her remote to unlock the doors (the car was running), but the driver's door did open with her key. I've had the car a little over 4 years, never experienced this before.
I tried to duplicate this action about an hour ago, and couldn't.
I am going to take major precautions if I have to get out while the car is on, like leaving the window open, or always keeping the spare in my pocket. What happened today was so unexpected, and many times I work 2 hours from home, and if I worked yesterday when we had the storm, I would have started the car, gotten out to clear the snow off the windshield, and this probably would have happened, with my spare key in my bag inside the car. My friend is always bragging about his On-Star service, and he can lock and unlock the car from his cellphone. I'm not going to get it for this car, and never thought it would be worth the money, but I now see a plus to him having it.
I'd still like to know for certain what made this happen.