When driving inductive loads with transistors, we use kickback diodes.
What I understand is a kickback diode supplies a path for the inductive charge to discharge. Also, an inductor will try to resist the change in the current, turning into something like a voltage source that will source the current in the same way it was before, in case of a break in the current (for example when the transistor turns OFF).
In the below circuits, there are two different placement of the kickback diode. D1 is placed in a logical way, so that the charge in L1 will discharge through it, protecting Q1's collector from over-voltage or breakdown.
However, the second circuit with D2 makes no sense to me. How can D2 prevent any damage when it is reverse biased? I was seeing this configuration rarely, however I saw it in a Lenze driver schematic and couldn't understand it.
How does D2 prevent any damage due to inductive kickback?