How is "double insulation" a substitute for grounding ?
Imagine that some operator is using a drill (or a sawzall), and he had hit a mains wire in the wall. There are two methods to prevent high voltage from getting to the operator.
I. Divert the threatening voltage.
But where to divert it to? The best place to divert it to is the earth ground. This is why some tools require an earth ground connection.
II. Create strong enough insulation which the threatening voltage can't cross
This is the strategy employed by double-insulated tools. Why double insulated? The standard assumes that any single layer of insulation may have a small local defect. With two isolation layers, the chance that defects on both layers will line-up are small. (See also here.)
Grounded tools are often easier to construct. They can be made lighter, or cheaper, or more performant kilo-for-kilo. But they require that the job site is wired with ground connections, which isn't always the case. Many mid-size corded tools are double insulated, which makes then more versatile.
related: Appliance classes