It is much more common to find applications for transistors where they are used as current switches, but what if you need to isolate both current and voltage for your power stage?
When current flows from collector to emitter, collector-emitter current is about 105 mA from which about 5 mA go through the resistor and, according to the Ohm law, voltage across the resistor should be approximately 5 V, leaving both enough voltage and current (the resting 100 mA) to switch on the lamp. Voilá!