  LGRBs are associated with massive stars and are therefore linked to star
formation. The conditions necessary to produce LGRBs can affect the relation
between the LGRB rate and star formation. By using the power of a complete LGRB
sample, our aim is to understand whether such a bias exists and, if it does,
what is its origin. In this first paper, we build the SED of the z<1 host
galaxies of the BAT6 LGRB sample, and determine their stellar masses from SED
fitting. We compare the resulting stellar mass distribution (i) with
star-forming galaxies observed in deep surveys (UltraVISTA); (ii) with
semi-analitical models of the z<1 star forming galaxy population and (iii) with
numerical simulations of LGRB hosts having different metallicity thresholds for
the progenitor star environment. We find that at z<1 LGRBs tend to avoid
massive galaxies and are powerful in selecting faint low-mass star-forming
galaxies. The stellar mass distribution of the hosts is not consistent with
that of the UltraVISTA star-forming galaxies weighted for their SFR. This
implies that, at least at z<1, LGRBs are not unbiased tracers of star
formation. To make the two distributions consistent, a much steeper faint-end
of the mass function would be required, or a very shallow SFR-Mass relation for
the low mass galaxy population. GRB host galaxy simulations indicates that, to
reproduce the stellar mass distribution, a metallicity threshold of the order
of Z_th=0.3-0.5Z_sun is necessary. Models without a metallicity threshold or
with an extreme threshold of Z_th = 0.1Z_sun are excluded at z<1. The use of
the BAT6 complete sample makes this result not affected by possible biases
which could have influenced past results based on incomplete samples. The
preference for low metallicities (Z<~0.5Z_sun) can be a consequence of the
particular conditions needed for the progenitor star to produce a GRB.
(Abridged)
