What does the collector resistor on this LED driver circuit do?
R2 provides base current for pass transistor Q1. If it is too high then LED current will be less than VBE/R1 and vary depending on the HFE of Q1. HFE is quite temperature sensitive and depends on the transistor. If R2 is too low then the circuit wastes more power than it needs to. R2 is 2K on your simulated circuit which gives more than 10mA drive at 24 V. This means that LED current would be fine at low temps with low gain transistors. If your minimum gain was about 50 you could increase R2 to say 4K.