Why Do Different Barrels Create Different Flavours?
A barrel's wood type, char/toast level, size and prior contents (bourbon, sherry, wine) all change what gets extracted into the spirit during maturation.
No two barrels mature spirit identically, and a few specific variables explain most of that difference.
Wood type
American white oak and European oak extract differently — American oak leans toward vanilla, caramel and coconut notes; European oak leans toward tannin, spice and dried fruit (see "What types of wood are used in barrel aging?").
Char vs toast
A heavily charred barrel creates a layer of caramelised sugars and charcoal that filters the spirit as it moves in and out of the wood grain, contributing smoky-sweet, caramel notes. A toasted (unburned) barrel gives a gentler, more subtle wood influence.
What the barrel held before
Many barrels are reused from a previous life holding a different product — most commonly ex-bourbon barrels (common in Scotch maturation) or ex-sherry, ex-wine, or ex-rum casks used for "finishing." Residual compounds from that prior contents can transfer into the new spirit, adding notes like sherry's dried fruit and nuttiness, or a port cask's berry-like sweetness. This is why "cask finish" whiskies (e.g. sherry-finished, port-finished) taste noticeably different from a standard ex-bourbon-only maturation.
Barrel size
Smaller barrels have more surface area of wood relative to the volume of spirit inside, generally speeding up extraction and maturation. Standard-sized barrels (like the ~200-litre bourbon barrel commonly reused in Scotch production) mature more slowly and evenly than smaller experimental casks some craft distillers use to accelerate the process.
How many times a barrel has been used
A brand-new ("virgin") oak barrel has far more extractable flavour compounds available than a barrel that's already matured two or three previous fills — each reuse extracts somewhat less than the last, which is why a first-fill cask tends to impart much stronger wood character than a third- or fourth-fill cask of the same type.