In a mirror the thin layer of metal at the back of the mirror provides the reflection. The glass can actually makes the reflection worse, by generating multiple reflections at the air-glass surface (most noticeable at large angles of incidence). If the metal layer is exposed to air it will 'tarnish' - becoming dull due to formation of oxides on the surface. It can also be scratched quite easily. Both these reduce the quality of reflection. Glass provides a layer of protection for the layer of metal. It is transparent and also hard, not easily scratched. It is also stiff and brittle, so it does not easily bend and distort the image.