Circuit topology name and function for PNP transistor in light barrier circuit
You made a good start by setting up a simulation. Unfortunately, your simulation is misleading you. There are two issues:


The phototransistor is not an ideal current source; instead, you should be modeling it as a current limiter. Putting a diode in parallel with it is one way to model this.
The circuit was undoubtedly designed for a supply voltage higher than 3V. 5V is much more likely.


Jonk's comment comes close to the answer &mdash; the transistor is functioning as an emitter-follower, with the emitter terminal held at roughly 2/3 the supply voltage plus a diode drop. This means that the voltage across the phototransistor is limited to slightly less than 1/3 the supply voltage.

While this will help with some dynamic effects, it's much more likely that it was done in order to meet a voltage rating limitation on the phototransistor.