The observation of a first sharp diffraction peak (FSDP) at low frequency in the X-ray and neutron scattering spectra of different imidazolium-based room-temperature ionic liquids (RTILs) (the so-called prepeak) has often been experimentally interpreted as indicative of mesoscopic organization leading to nanoscale segregation and the formation of domains of different morphologies. This interpretation that has permeated the analysis of many recently published articles deserves an in depth theoretical analysis. In this article, we use several different computational techniques to thoroughly dissect the atomistic components giving rise to the low-frequency FSDP as well as other features in the structure function (S(q)). By understanding how S(q) changes as imidazolium-based ionic systems undergo solid-liquid phase transition, and by artificially perturbing the liquid structure in a way that directly couples to the intensity of the FSDP, we are able to identify in a rigorous way its geometric origin. Similar to the solid phase, the liquid phase is characterized by two typical length scales between polar groups. The shorter length scale gives rise to a shoulder peak in S(q) at about 0.9 Å(-1) whereas the longer one gives rise to the prepeak.