It doesn't.
First, it's not actually an Em in that use; it just looks like one. In that use, it's just another inversion of the intended chord, with some slop allowed in letting that high E in. It's called Em as a fingering shortcut only, not in the theoretical sense.
Secondly, it doesn't take the place of a G, as you stated. It takes the place of a G with an E bass note. As for why it can theoretically work in a pinch to replace G w/ E bass, the fingering that we normally refer to as open Em has the E bass in it, and none of the other notes in it clash with the G w/ E bass chord. You end up with a high 6th, but it likely won't clash, and it can also easily be left out of the chord if it does.
Thirdly, it's an imperfect option anyhow, placed there as a cheater shortcut, so it makes no sense to spend any time thinking so hard about it. If you have the time to go on the Internet and ask about it at all, then you have the time to just learn how to play the right chord in the first place. It's what you're supposed to do anyhow if you have the time to figure it out. The Em notation is just a quick sight reading shortcut.
Finally, the originally intended chord is arguably even easier to play than the open Em formation. That's because depending on where you are on the neck when that chord comes up, going to first position to play that open chord might require a larger shift than playing that bar-g-based chord.
In short, don't worry about it so much, and just play the right chord, since you aren't sight reading, and have the luxury of study time.