We use two cosmological simulations of structure formation to study the conditions under which dark matter haloes emerge from the linear density field. Our analysis focuses on matching sites of halo collapse to local density maxima, or ‘peaks’, in the initial conditions of the simulations and provides a crucial test of the central ansatz of the peaks formalism. By identifying peaks on a variety of smoothed, linearly extrapolated density fields, we demonstrate that as many as ∼70 per cent of well-resolved dark matter haloes form preferentially near peaks whose characteristic masses are similar to those of the halo, with more massive haloes showing a stronger tendency to reside near peaks initially. We identify a small but significant fraction of haloes that appear to evolve from peaks of substantially lower mass than that of the halo itself. We refer to these as ‘peakless haloes’ for convenience. By contrasting directly the properties of these objects with the bulk of the protohalo population, we find two clear differences: (1) their initial shapes are significantly flatter and more elongated than the predominantly triaxial majority and (2) they are, on average, more strongly compressed by tidal forces associated with their surrounding large-scale structure. Using the two-point correlation function, we show that peakless haloes tend to emerge from highly clustered regions of the initial density field implying that, at fixed mass, the accretion geometry and mass accretion histories of haloes in highly clustered environments differ significantly from those in the field. This may have important implications for understanding the origin of the halo assembly bias, of galaxy properties in dense environments and how environment affects the morphological transformation of galaxies near groups and rich galaxy clusters.