The 4th basic principle of flag design is “no lettering or seals”. Logos generally fall under this category as well. This doesn’t keep lots of flags, particularly of corporations, from having logos on them. And occasionally a logo flag works well as a flag — usually because it obeys all or most of the other four principles (keep it simple, use meaningful symbolism, use 2 or 3 basic colors, and be distinctive or be related).
The McDonald’s logo, the Golden Arches, is one that works well on a flag: it is simple, bold, distinctive, and the stylized M is readable from the front or back.