Why are carpenters' pencils flat?
According to wikipedia, it's so they don't roll away::


  A carpenter pencil (carpentry pencil, carpenter's pencil) is a pencil
  that has a body with a rectangular or elliptical cross-section to
  prevent it from rolling away. Carpenter pencils are easier to grip
  than standard pencils, because they have a larger surface area. The
  non-round core allows thick or thin lines to be drawn by rotating the
  pencil. Thin lines are required for high precision markings and are
  easy to erase, but thick markings are needed to mark on rough
  surfaces. The lead is strong to withstand the stress of marking on
  such surfaces. The pencil is robust to survive in a construction
  environment, for example when placed in a bag together with heavy
  tools. The core is often stronger than in other pencils. Carpenter
  pencils are also used by builders, because they are suitable for
  marking on rough surfaces, such as concrete or stone. This shape and
  lead density aid in marking legible lines with a straight edge that
  are clear and easy to follow with a saw blade.


Though it's possible that there's some historical precedent involved:


  The flat pencil is one of the oldest pencil types. The first versions
  were made by hollowing out sticks of juniper wood. A superior
  technique was discovered: two wooden halves were carved with a groove
  running down them, a plumbago stick placed in one of the grooves, and
  the two halves then glued together—essentially the same method in use
  to this day.


The "flat so it doesn't roll" theory is also supported by this article on Carpenters Pencils at PencilPages.com


  A carpenter's pencil has at least two essential characteristics which
  distinguish it from other types of specialty pencils. First, the shape
  of a carpenter's pencil prevents it from rolling, even when placed on
  a steep sloping roof. The most popular shape seems to be a flat,
  octagonal style. Secondly, the lead must be strong enough to make a
  heavy mark and to withstand the stresses of carpentry, which
  frequently requires marking on very coarse surfaces. The leads are
  usually wide and flat.