The answer to this is that electricity does not always take "the shortest path to ground." That phrase is an oversimplification that can be useful, but in this case is not.
A more correct statement is that electricity flows from a high potential to a low potential. In the case of the power to you house, that means it travels in a loop between the power company and your house. That loop happens to have a single point where it connects to the "ground" under your feet, but that doesn't make a loop.
Well, it kinda does. The power plant is on the ground too, so in theory there are two parallel connections. One goes through one wire into your house, exits, and returns on the other wire, and the other goes through one wire into your house, exist, and then heads out to the "ground" and travels to the power plant along that path.
In reality, both paths are followed, all the time. However, the resistance of the ground between you and the power company is far larger than that of the wire, so the vast majority of the current travels through the wires.