Toasting whole spices heats the volatile flavor compounds within them, causing those compounds to change shape and recombine, forming new, more complex aromas.| Serious Eats