We investigate how the shape of the galaxy two-point correlation function as measured in the zCOSMOS survey depends on local environment, quantified in terms of the density contrast on scales of 5 Mpc/h. We show that the flat shape previously observed at redshifts between z=0.6 and z=1 can be explained by this volume being simply 10% over-abundant in high-density environments, with respect to a Universal density probability distribution function. When galaxies corresponding to the top 10% tail of the distribution are excluded, the measured w_p(r_p) steepens and becomes indistinguishable from LCDM predictions on all scales. This is the same effect recognised by Abbas & Sheth in the SDSS data at z~0 and explained as a natural consequence of halo-environment correlations in a hierarchical scenario. Galaxies living in high-density regions trace dark matter halos with typically higher masses, which are more correlated. If the density probability distribution function of the sample is particularly rich in high-density regions because of the variance introduced by its finite size, this produces a distorted two-point correlation function. We argue that this is the dominant effect responsible for the observed peculiar clustering in the COSMOS field.