Every year my mom used to go crazy over Easter. We would have an epic egg hunt with beautiful baskets and always, the chocolate Easter bunny. Sometimes when I sit down and really appreciate a piece of chocolate, smelling it will take me back to those Easters. Have you ever had that experience where a smell sparks a very vivid memory?
This connection between smell and memory has been attributed to something called the structure-function relationship. The structure-function relationship is the biologic principle that everything in the body is organized in order to support, (or optimize,) its function. The proximity of two organs with described functions suggests a strong relationship between these functions. Of course as with any theory it can not be applied 100% , but, the theory has been supported again and again in biology, from genetic to cellular structure all the way up to organ structure.
There is a lot of controversy about exactly how our memories work, however there is general agreement that a structure called the hippocampus is primarily involved in memory formation and retrieval. In the brain, the structure responsible for processing smell (the olfactory or piriform cortex) is right next to the hippocampus. The proximity of these two organs suggests and strong relationship between smell and memory. This is a great article with more detail on this topic that you might want to check out if you are interested.
Our bodies really are the ultimate brilliant design.