Electricity is no respecter of the NEC or any other regional code for that matter. Electrical codes try to ensure some level of safety but are compromised due to political and economic factors. Codes also change over time, due to bad experiences, lessons learned, as well as changing political / economic factors. Alas, this does not mean they should not be ignored, there is a much good advice within. The danger comes into being when they are viewed as some sort of divine truth.
A common problem in older houses is that most of their electrical outlets are 2 prong thus lacking the ground connection. There are many ways folks try to mitigate this shortcoming, some of which pose electrocution hazards, some of which pose fire hazards, and of course the right way which equates to ripping things to bits and starting over.
The most common approach is a 3 to 2 prong adaptor which is rarely if ever used properly. The little grounding tab is supposed to be connected to ground via an outlets center screw… alas, many boxes are not grounded.
1. Many years ago, BX cable (basically 2 wires surrounded by a spiral metal shell) was commonly used. On a positive note, the spiral metal shell sort of provided a ground path between an outlet box and the main panel. By sort of, it provides a path such that a 3 light outlet tester would likely indicate the outlet was grounded. Alas, under a serious fault condition, the spiral metal sheath might not provide solid enough ground connection to trip the breaker… in some cases, the breaker would not trip, that is until the spiral metal shell turned red hot and melted the insulation off the wires shorting them together and in some cases starting a fire in the wall. (BX has not been sold for many years as it was replaced by AC cable (which looks the almost the same but has a continuous ground specifucally designed for fault currents)
2. The use of a GFCI as a workaround is a legal short cut, and it can serve to mitigate shock hazards. Fire hazards are another story. In some future versions of the NEC, I fully expect this practice to be made illegal, just as the old school means of grounding via a water pipe or single wire to another ground circuit were made illegal. (The NEC does allow one to run a single ground wire back to the main panel, but its vagueness as to wire routing / protection makes for a fire waiting to happen depending upon the installer.)