I have thought long and hard about grounding. This seems to be a topic which mystifies even many electrical engineers.
Let's pretend we have a 1,000 Volt DC source. Say the negative terminal is not connected to anything but we connect the positive terminal to a copper rod and bury it in the earth. All of a sudden, when we close the switch between the battery and the copper rod, charge will be allowed to diffuse from the positive terminal into the earth. The charge will continue to expand across the surface of the earth until the earth and the positive terminal of the source reach the same voltage. Now here is the catch, the earth is huge compared to the voltage source, (surface are and volume wise) and so the question arises...how much charge would we need to pump into the earth so that the positive terminal would be equipotential with the earth? And how long would the transient last for? The same thing happens in AC except the earth is constantly discharging and then recharging. The thing is, the earth can absorb a lot of charge....it has a huge self-capacitance.
In effect for all practical intents and purposes the earth can absorb or give up an infinite number of electrons and remain electrically neutral. Although the steel frame of a building is not nearly as massive it is a good conductor and is also relatively massive compared to the charge it can take on or give up. It's also usually in contact with the earth at multiple points.
Conductivity of the earth and the ability to give up or take on electrons depends on several factors such as moisture content and the nature of the chemicals at any location. Very dry rock formations such as those experienced in mountain locations can be difficult. Damp soil with lots of ionized salts can be very good. In a building for various reasons including circulating currents, the potential of the steel between two points can be different at any given moment. The same can happen to the earth itself in some circumstances. Therefore ground currents can flow within the earth or within the steel of a building. For certain types of systems where this is not acceptable, a single common ground can be used as an ultimate ground point. Isolated grounding schemes avoid creating circuit ground loops throughout the distribution system. Where separate sources are grounded at different locations, an equalization ground wire of very low impedance can be used to minimize the difference between ground potential at different locations.