4 pages, 4 figures, submitted for publicationNucleonic matter displays a quantum liquid structure, but in some cases finite nuclei behave like molecules composed of clusters of protons and neutrons. Clustering is a recurrent feature in light nuclei, from beryllium to nickel. For instance, in $^{12}$C the Hoyle state, crucial for stellar nucleosynthesis, can be described as a nuclear molecule consisting of three alpha-particles. The mechanism of cluster formation, however, has not yet been fully understood. We show that the origin of clustering can be traced back to the depth of the confining nuclear potential. By employing the theoretical framework of energy density functionals that encompasses both cluster and quantum liquid-drop aspects o...