The goal of the Ariel space mission is to observe a large and diversified population of transiting planets around a range of host star types to collect information on their atmospheric composition. The planetary bulk and atmospheric compositions bear the marks of the way the planets formed: Ariels observations will therefore provide an unprecedented wealth of data to advance our understanding of planet formation in our Galaxy. A number of environmental and evolutionary factors, however, can affect the final atmospheric composition. Here we provide a concise overview of which factors and effects of the star and planet formation processes can shape the atmospheric compositions that will be observed by Ariel, and highlight how Ariels characteristics make this mission optimally suited to address this very complex problem.