This combination of two NPN transistors has a very high current gain equal to the product of the current gains of each separate transistor.
Gains from 100 to 160 000 are possible.
This means that a very small input current (a few microamps) can fully switch on the pair.
About 1.2 volts on the base of the input transistor is needed to switch on the pair.
The 1M resistor can be replaced by human skin to make a touch sensitive switch. Alternatively a rain sensor could be connected in series with the 1M resistor. Rain drops would then turn on the circuit.
The diode is only needed if the load is inductive. It allows the inductor current to die away gradually. This prevents large back EMF voltages which would otherwise destroy the transistors.
