If I understand your question correctly, a battery isn't required to demonstrate this problem. Say you have any object, at some potential. Then, you connect it to some other potential. Does some current flow? Let's say it's a cube of metal, and it's at Earth's potential, plus one volt. Then, it's suddenly connected to Earth:
simulate this circuit – Schematic created using CircuitLab
Short answer: no current flows. There is no circuit for current to flow.
But this is an approximation, made to simplify analysis. We are neglecting an important fact: everything has some capacitance to everything else. The metal cube is one plate of the capacitor, and Earth is the other. So the circuit is actually this:
simulate this circuit
In this case, when V1 suddenly becomes 0V, some current will flow. The total charge that will flow will depend on the capacitance \$C\$, which is very tiny. Maybe \$1fF\$, if even that. We know that capacitance times voltage is charge:
$$ CV = Q $$
So the total charge that will flow if V1 goes from \$1V\$ to \$0V\$, and \$C\$ is \$1fF\$ is:
$$ 1fF \cdot -1V = -1fC $$
This is a very tiny charge, well beyond insignificant to any practical circuit.
The current that will flow is a function of how fast \$V_1\$ changes, and the capacitance \$C\$, according to:
$$ I = C\frac{\mathrm{d}v}{\mathrm{d}t} $$
So how does this relate to ESD?
ESD is what you get when the potential difference between two things is great enough to breakdown the insulation between those things. Usually that insulation is air. How much voltage this takes depends on many factors, and I'm hardly an expert, but we are talking about differences measured in kilovolts.
These high voltages are attainable precisely due to the very small capacitance between you and everything else. Recall again that \$CV=Q\$. We can rearrange that as:
$$ V = \frac{Q}{C} $$
If \$C\$ is very small, then a very small charge \$Q\$ can lead to a very high voltage. When you shuffle across the rug you might only transfer a (metaphoric) handful of electrons, but that's enough to change your voltage relative to your environment quite a lot.
Once you are talking about kilovolts, and not the \$1V\$ in the example as before, that insignificant current is not so insignificant any more. Still small, mind you, but it's applied in such a brief instant it can damage sensitive devices.
Perhaps the most commonly damaged device in modern times is the gate insulation oxide in MOSFETs, which is so thin it might have a breakdown voltage of maybe \$10V\$. If you had enough charge on you to raise your voltage enough to zap the relatively strong air around you, then the few atoms of silicon dioxide can hold that charge back about as well as wet tissue paper:
In a nutshell
Electricity is not supposed to flow through ground stakes in normal conditions. It doesn't mean its resistance is high, it's actually surprisingly small. That branch of the circuit is simply not closed normally.
In details
A ground is a reference point. You could litterally take any net in your circuit which is supposed to stay at a steady voltage and call it ground. After all voltage sources create a difference of potential (called a voltage) between two nets, regardless of what their potentials are - if they're both fixed externally, there will be a conflict and bad things, but if one of them is fixed the other potential will change accordingly. Generally the ground is taken such that we work with positive supplies predominantly, e.g. ground on the - terminal of a rectifier bridge. It doesn't mean all the current flow through that, it's only a reference.
The Earth has mainly a person protection role. No current is supposed to flow in the Earth because the actual supply circuit is isolated from the Earth, however what if this isolation is compromised (wires eaten by rabbits, children shoving their fingers in sockets...)? Everyone is indirectly connected to Earth (no isolation is perfect), which means that that circuit will now be closed and the only thing that will limit the current going through whatever is closing the circuit (e.g. people) is its internal resistance. Depending on the environment, that resistance can be sufficiently low to kill someone; refer to this thread about what voltages are considered safe. To prevent that, every enclosure is connected to Earth (a Earth-R-Earth circuit has a near-0A current), and the electric supply has a residual current device that compares the current going in and out, and cuts off the supply if there is a leak (through Earth).
The Earth is used for an equi[reference]potential supply The electricity provider needs to protect its people too, so the upstream supply is also referenced to Earth. Just like everywhere else. So what happens if the Earth is not a good conductor and its potential is not homogeneous? Users could be in contact with 2 different Earths, which can be a high difference of potential (=voltage). Thankfully, moist in dirt and water patches are good conductors, but above all the equivalent cross section of this fictive conductor is massive. Except during short upsets such as lightning, it has an excellent homogeneity in potential. Why use another conductor for ground which will use more copper and actually be less effective if we can use what's under our feet?
The Earth is also useful as a protection against lightning: lightning is just like any dielectric/isolator breakdown, it occurs where the resistance between the charged cloud and the Earth is minimal (see this amazing GIF). High trees, towers etc., and we can't risk relying on luck alone so highly conductive spikes are used to attract lightning, and the Earth is used to dissipate that energy. Loosely said. Normally lightning has enough current flowing to create through Earth and across human legs a voltage high enough to kill them, so it is spread out more evenly.
As usual, I'll warmly welcome anyone correcting me if not accurate.
Best Answer
In reality there is current in the ground connection, but not enough to measure above ambient noise level.
Below is your equivalent circuit.
simulate this circuit – Schematic created using CircuitLab
ADDITION
As such we normally ignore that leakage current in DC circuits. So let us look at your question another way.
For the moment consider what would happen if an electron fell down that "drain" to ground. What happens to the rest of the circuit?
Suddenly it will have a missing electron and will have a net positive charge. The ground now has an extra electron and has net negative charge. That means there is a reverse voltage on the ground wire which will immediately cause the electron to return to the circuit.
The opposite would happen if somehow an extra electron were to arrive from the ground. The circuit would be at a negative potential and ground would be positive. The visiting electron would be immediately repelled.
In actuality, that returning force is what prevents the electrons from crossing the connection in the first place. It is a self stabilizing state.