Purpose of pullup resistor in BJT LED driver circuit
That open collector output ... when off, it will have some leakage (possibly microamps) depending on temperature. That can supply enough base current to turn Q2 on, at least partially. The simulation might not model that leakage accurately.

R1 pulls Q2 base to 5V against that leakage, ensuring Q2 is fully off.