Usually caused by lag between the server and client, namely, a block update from the client is missed by the server, so when the client polls the server to make sure the update happened, it sees that it didn't and restores the block. And since single-player has been running on an internal server since 1.3, it can happen there as well, though not nearly as often as it can in multiplayer. Using tools with high Efficiency enchantments and the Haste/Haste II effects active can cause it to happen more often, as the tools will tear through the blocks too fast for the server to keep up.
Recent changes to the network code may have affected this, though. I'm sure they are working on smoothing such glitches out, but it may be impossible to completely eliminate such errors.
Usually caused by lag between the server and client, namely, a block update from the client is missed by the server, so when the client polls the server to make sure the update happened, it sees that it didn't and restores the block. And since single-player has been running on an internal server since 1.3, it can happen there as well, though not nearly as often as it can in multiplayer. Using tools with high Efficiency enchantments and the Haste/Haste II effects active can cause it to happen more often, as the tools will tear through the blocks too fast for the server to keep up.
Recent changes to the network code may have affected this, though. I'm sure they are working on smoothing such glitches out, but it may be impossible to completely eliminate such errors.