How do the electrons "know" where to go when grounded in this simple lightbulb example? A rookie question but I'm reading a chapter in a book (Code: The Hidden Language of Computer Hardware and Software) that discusses a simple electricity/lightbulb model (pictured below)

The book says that the electrons from the negative terminal of the battery go into the earth and then electrons come out of the earth at your friend's house, go through the lightbulb and wire, the switch at your house, and then the positive terminal of the battery.
My question is: How do the electrons exiting the negative terminal "know" where to go (the lightbulb)? Are these just totally different electrons? If so, then what's the point of the battery?
I know it's a beginner question but I just couldn't figure it out!
Thanks!
 A: 
 Are these just totally different electrons?

Yes. The electrons actually don't drift far. Typically only a few millimeters a second, if I remember correctly. Compare it with a traffic queue; when the first one moves, he leaves space for the next, who then moves and leaves space for the next and so on. The motion progresses through the whole queue (wire), even though the individual cars (electrons) don't move much.
New electrons enter at the other end, since they see a lack of electrons here, now that they all have moved a step forward. A lack of electrons at a spot is namely a spot with slightly less negative charge, which repels electrons less than all other places. So new electrons will quickly move here. 

If so, then what's the point of the battery?

We just described how electrons move. But why they move is another question. Something must "pull" in the electrons, otherwise they wouldn't want to move at all.
Since we know that negative charge is attracted by positive, we can create such "pull" by placing a positive charge. That's the battery's positive end. Electrons are drawn towards it, and that makes the drift. That causes the current. 
As electrons keep arriving at the positive end, they would pile up. They would  accumulate a bigger and bigger negative electric field, which would repel and soon prevent any further electrons from arriving. The current would stop again. So the battery has to carry them away. 
Inside the battery some complex chemistry takes the incoming charges and carries them to the negative end. They don't want to be here, because they are repelled from something negative. So they drift away into the ground, making space for others.
A battery is like a pump in a water pipe that keeps the flow going. 
A: 
How do the electrons exiting the negative terminal "know" where to go
  (the lightbulb)?

They move to areas of lower potential energy.  Think of your bathtub being filled with water to the height of the overflow drain.  If you add water anywhere in the bathtub, some water will flow out the drain.  Most of the water going down the drain will not be from the bucket you added, but we don't care about the specific water molecules.  Just that adding any water supplies a pressure that pushes some other water (of equal volume) into the drain.

Are these just totally different electrons? If so, then what's the
  point of the battery?

Yes, they're different electrons.  But the battery is supplying the "pressure" (voltage) that allows them to move.
A: The reason the electrons are able to travel around the circuit is because there is a potential difference between each subsequent infinitesimal segment of wire.
Or put in another way each part of the wire is at a slightly lower electrical potential than the previous former part, an electron just leaving the negative terminal of the battery will have a high electrical potential. If you think about this it would have to be the case as the electrons can never flow around the circuit without a potential difference.
The battery is needed to maintain a potential difference across the circuit due to separation of charges via chemical reactions within the battery.
