Don't do this.
First and foremost it's straight up illegal in Germany. No ifs, not buts. To quote (translated) -
In particular, it is prohibited to unnecessarily run vehicle engines
It's also illegal in the UK (sec. 42 of the Road Traffic Act), and in the following US States:
Arizona, California, Colorado, Connecticut, Delaware District of Columbia, Georgia, Hawaii, Illinois, Louisiana, Maine, Maryland, Massachusetts, Minnesota, Missouri, Nevada, New Hampshire, New Jersey, New York, Ohio, Oregon, Pennsylvania, Rhode Island, South Carolina, Texas, Utah, Vermont, Virginia, Washington, , Wisconsin, and Wyoming
Secondly - you're adding unnecessary wear on the engine - I can't find the link off hand but if I recall correctly each hour of idling is equivalent of 33 miles worth of driving.
Thirdly you risk draining the battery - you're placing a relatively high load on the alternator under conditions where it is unable to provide optimal current (i.e. idle).
Fourthly it creates unnecessary emissions/pollution. I'm no tree-hugger (I do drive a V8 after all) but still there's an element of being reasonable here.
Finally you're running the car in hugely sub-optimal conditions for cooling - much of the performance of the cooling system relies on there being frequent airflow over the radiator. The radiator fans help when it's stationary but aren't able to match what the motion of the car even at modest speeds can achieve. Add in that you've got additional heat being dumped from the aircon rad (usually in close proximity to the main engine radiator) and you're asking a great deal of it. Especially on very hot days!
And if the intent is to do this when the car is unattended then you won't be around to deal with any overheating condition and you could come back to a wrecked engine that would have been easily averted were you present.
Yes people do do this, and quite frequently they "get away with it" and nothing bad happens - it doesn't make it any less of a dumb idea though.
For bonus stupidity if you're doing it with the keys-in-the-ignition method it's a spectacular theft risk. It doesn't matter if you've locked the door if someone throws a rock through it they can be in the car and driving down the road in seconds.
Getting into a hot car that's been baking in the sun all day sucks - I get it. But in the grand scheme of things it's a tiny inconvenience and you can easily use things like this to reduce the problem without incurring all the risks of running the engine in this manner.