A lot of ‘flavor’ is actually due to smell. There are different similar organic compounds that contribute to different aromas. They chemically isolate the different compounds in different foods to determine what contributes to the flavor.
https://jameskennedymonash.files.wordpress.com/2014/01/table-of-organic-compounds-and-their-smells-w12.pdf
https://jameskennedymonash.files.wordpress.com/2013/12/table-of-esters-and-their-smells.jpg
Latest Answers