Based on the archival data from the Chandra observations of nearby galaxies, we study different sub populations of low-mass X-ray binaries (LMXBs) - dynamically formed systems in globular clusters (GCs) and in the nucleus of M31 and (presumably primordial) X-ray binaries in the fields of galaxies. Our aim is to produce accurate luminosity distributions of X-ray binaries in different environments, suitable for quantitative comparison with each other and with the output of population synthesis calculations. Our sample includes seven nearby galaxies (M31, Maffei 1, Centaurus A,M81, NGC 3379, NGC 4697, and NGC 4278) and the Milky Way, which together provide relatively uniform coverage down to the luminosity limit of E35 erg/s. In total we have detected 185 LMXBs associated with GCs, 35 X-ray sources in the nucleus of M31, and 998 field sources of which ~ 365 are expected to be background AGN. We combine these data, taking special care to accurately account for X-ray and optical incompleteness corrections and the removal of the contamination from the cosmic X-ray background sources, to produce luminosity distributions of X-ray binaries in different environments to far greater accuracy than has been obtained previously. We found that luminosity distributions of GC and field LMXBs differ throughout the entire luminosity range, the fraction of faint (log(Lx) < 37) sources among the former being ~ 4 times less than in the field population. The X-ray luminosity function (XLF) of sources in the nucleus of M31 is similar to that of GC sources at the faint end but differs at the bright end, with the M31 nucleus hosting significantly fewer bright sources. We discuss the possible origin and potential implications of these results.