Many manufacturers implement this feature into tools specifically with a spinning blade or cutter.
These mechanisms are designed to prevent injuries resulting from things like kickback or skin-to-blade contact.
The disadvantage of this feature is that it wears the brushes prematurely when compared to non-brake tools.
The way the brake on cordless tools works is slightly different than in corded models; when the switch is released, the motor terminals are shorted together, causing the motor to stop almost instantly by dissipating the rotational energy in the windings.
This method is practical for the small permanent-magnet motors in cordless tools, which have low inertia, and is applicable to both brushed and brushless variants.