It had to do with the basics of cowl design (and there might be errors here, so bear with me -- I'm used to being the village idiot when it comes to propeller driven aircraft).
- Propeller: Since almost all aircraft were tractor props, the propeller would be in front of the cowling. The propeller accelerates the airflow and increases the pressure of the flow.
- Cowl-Lip: The cowl is divergent in shape, which slows down the airflow going through the cowling: This effectively provides more pressure and more air in a given area to absorb the heat from the engine. Provided the velocity is slowed down and builds up pressure, yet remains fast enough to carry away the heat, you have a design that seems workable. While increasing pressure does produce heat, it's not particularly massive (this becomes more significant when supersonic), and the air outside is very cold, and the air temperature is high.
- Air-Cooled Engine: Air flows from the cowl-lip to the engine, and is heated up substantially by the engine. This causes the air to absorb the heat, and bringing down the engine temperature. It also causes the air to heat up, and expand. Provided the expansion goes more rearwards than forwards, you have a degree of "thrust" that is produced (unfortunately, it almost never equals the amount of drag, but it will negate some of the drag produced by the assembly).
- Aft Cowl / Cowl-Flaps: I'm not sure the exact term but it's basically the shape of the cowl/fuselage behind the engine, which form a convergent shape. Theoretically you want to make the shape quite convergent as it accelerates the airflow the most, but pressure plays a role in imposing limits on this. The pressure gets too low, and you'll see the air dam up, so you'll have cowl-flaps to allow extra area for the air to escape. This arrangement reminds me a bit of the nozzles on jet-fighters, which are fully open at idle to allow the airflow plenty of area to escape; as the engine spools up, the exhaust pressure goes up, and the nozzle can be narrowed down, and produce a faster exhaust velocity. When 100% power is produced, the nozzles are narrowed in as much as possible. This set-up seems the same on cowling flaps.
Some aircraft have tighter cowlings than other aircraft, being barely big enough to encompass the engine they're built around; a more prominent bell-mouthed shape, a fatter spinner, and a narrower aft-cowling, and so on. These are generally aimed at reducing cooling drag, though they have a tendency to reduce cooling. I figure, if the top-cowling flap was faired over by a metal-plate, then the airflow would have to escape out the other flaps, or the cowling would simply be "tighter" in the back.