Yes, it seems obvious. But every year many dogs die or suffer the effects of heatstroke because their owner left them in a car "just for a few minutes".
I love to take my dogs with me and do so often but I never leave them in the car for even a few minutes. I can leave my car running with the a/c on and lock the doors but what happens if the a/c fails or the engine dies for some reason? What happens if someone steals my car with the dogs inside?
It takes very little time for a car to heat to a dangerous temperature. There's absolutely no good reason to take a dog with you if you know you will have to leave it in the car. Dogs may love to go with you on errands but they shouldn't die because someone thought it would be better to take the dog along rather than leave it safely at home.
If you see a dog in a car, even if the windows are cracked, get the car make, color and license number. Go into the nearest store or stores and ask the manager to make an announcement. Go back out and call the police and animal control giving the car's info and location. Wait by the car until someone arrives. Many suggest breaking a window to save the dog but be aware you may face charges if you choose to do this. It's a judgment call and for me, it would depend on the condition of the dog. Learn to recognize the signs of heat distress so you can try and judge whether the dog's life is in imminent danger. If you do break a window be prepared to deal with the dog and the possibility of the dog escaping. Some dogs are very protective of their owner's cars so be prepared for that too. Be prepared to pay for the damage to the vehicle and to face an angry person. Stay non confrontational if at all possible.
I've known several people who lost their dogs because they left them in their vehicle. They weren't bad people. They didn't realize how quickly a car can heat up and how deadly it can be for a dog. It's happened to K9 officers too who left the a/c on and the car running only to find something malfunctioned and their dog paid the price.