On The Origin Of The Mass-Metallicity Relation For GRB Host Galaxies