This is called a pennant (I hope I translated that correctly, "Stander" in German).
Flying a pennant has disadvantages (as you mentioned), but it also has advantages. Allowing messengers to locate the commanding officer quickly is one of them. A boost to morale, knowing that your General is right there. I don't know WWII US army procedures, but in the German Bundeswehr a car flying a General's pennant will usually not be stopped at checkpoints either, allowing for speedy travel.
Of course it becomes a problem the higher enemy activity in the area is, to the point where the disadvantages outweigh the advantages. That is for the General to decide. I don't remember the movie scenes in question, but I can readily believe that Patton didn't give a damn.
As for "did something bad happen to Generals", I'd cite Erwin Rommel who was seriously injured in a strafing attack. Whether the pilot actively identified his car as "uh, this looks important" or just shot at "random car on the road" is unknown though.
You might want to note that naval traditions are even more pronounced in this regard. Since ship-to-ship communication was done by means of flags, it was imperative that every ship in the fleet knew which ship carried the admiral, at all times and at a glance. So even in the midst of battle, the flagship would be easily distinguishable because it would be flying the admiral's flag -- even if that might mean drawing additional attention to itself.
Wikipedia: Replica of Patton's command vehicle with exactly those pennants