  The incidence of strong MgII systems in gamma-ray burst (GRB) spectra is a
few times higher than in quasar (QSO) spectra. We investigate several possible
explanations for this effect, including: dust obscuration bias, clustering of
the absorbers, different beam sizes of the sources, multiband magnification
bias of GRBs, association of the absorbers with the GRB event or the
circumburst environment. We find that: i) the incidence rate of MgII systems in
QSO spectra could be underestimated by a factor 1.3-2 due to dust obscuration;
ii) the equivalent-width distribution of the MgII absorbers along GRBs is
consistent with that observed along QSOs thus suggesting that the absorbers are
more extended than the beam sizes of the sources; iii) on average, GRB
afterglows showing more than one MgII system are a factor of 1.7 brighter than
the others, suggesting a lensing origin of the observed discrepancy; iv)
gravitational lensing (in different forms, from galaxy lensing to microlensing)
can bias high the counts of MgII systems along GRBs if the luminosity functions
of the prompt gamma-ray emission and of the optical afterglows have a mean
faint-end slope approaching -5/3 -- -2; v) some of the absorbers can be
associated with the circumburst environment or produced by supernova remnants
unrelated to the GRB event itself but lying in the same star-forming region.
With the possible exception of magnification bias, it is unlikely that one of
these effects on its own can fully account for the observed counts. However,
the combined action of some of them can substantially reduce the statistical
significance of the discrepancy.
