Prior to this time, wooden pencils were predominantly made using Juniperus virginiana (eastern red cedar), a juniper tree found in eastern parts of Canada and the US. Its fine-grained wood smells nice and doesn't easily splinter when sharpened, making for good graphite-based wooden writing implements. However, the need to use wood free of knots and from the core (heartwood) of mature trees, coupled with a fairly wasteful manufacturing process and the slow-growing nature of eastern red cedar trees, resulted in the depletion of suitable old-growth trees by the 1930s. Pencil manufacturers turned to Calocedrus decurrens (California incense cedar), which grows in western North America and also has a nice-smelling, splinter-resistant wood.
|Pencils smell like they do because they are made of cedar (Source)|
In addition to cedars, other woods prized at least in part for having a pleasant odour are rosewood (e.g. Dalbergia nigra, which is hard, smells sweetly like roses, resonant, and has pretty dark streaks), sandalwood (the enduring flowery scent of its essential oil makes it a key ingredient in many perfumes), and lignum vitae (also used in perfumes).
Yet woods can also have stranger smells about them.
Several species of the genus Cordia residing in warmer parts of the Americas are commonly known as bocote. Their wood, often possessing a knot-like, meandering grain, can be found in furniture, cabinets, floor planks, boats, drums, and guitars. It apparently smells faintly of dill pickles while it's being worked on. Dill pickles!
Camphor, the terpenoid responsible for the strong medicinal odour of Vicks VapoRub (and other gooey preparations used to relieve congestion), is produced by Cinnamomum camphora (camphor tree), an evergreen found throughout East Asia. Its wood is fairly easy to work with and can contain visually appealing burls.
Last but not least, Ptaeroxylon obliquum is a tree indigenous to southern Africa. Its wood is hard and durable, which has led to its use in fence posts, railway ties, building frames, machine bearings, and xylophones. The tree is commonly known as sneezewood since it has a peppery smell and tends to cause the person who is cutting or sanding it to sneeze violently. This strange property has been attributed to it containing an irritating coumarin known as nieshoutol.
Hemmerly TE. 1970. Economic uses of eastern red cedar. Economic Botany 24(1):39-41. [First two pages]