Because that’s the color of the glass, if you look through enough of it – it’s not perfectly transparent. (Some fiber-optic glass is incredibly clear anmd transparent. There used to be a block of it at the Corning Glass Museuym in Corning, N.Y. I don’t know if it’s still there since they refurbished the place). You see green at the edges because you’re either looking through the width or length of it , or because the edge acts as a reflecting prism that re-directs your vision so you’re looking through a length of it. Looking through the three foot width or the seven foot height of a glass door is a much greater length than the 1/4" - 1/3" thickness you look through normally, so the color is much more apparent.
The particular color you see is mostly due to impurities, as already stated. There’s an additional factor which enhances the effect. Ordinary glass has an index of refraction high enough (about 1.5) that for a squared-off piece of glass (with all corners at right angles) any light coming in at an edge will be totally internally reflected until it reaches another edge (or gets scattered or absorbed along the way).
So looking at the edge from any angle, you see light that’s bounced off the flat surfaces of the glass many times, making its path length in the glass much longer than it would otherwise be. This wouldn’t happen with a substance having a smaller index of refraction. If you put the glass in water (n=1.33), for example, and look at the edge at a grazing angle, you will be able to see out through the flat surface of the glass (and the edge won’t appear green). As you look at less grazing angles, total internal reflection will begin and the glass will start to look green again.