Why is the output voltage of this circuit is changing in simulation?
I tested this in real with a scope, and the voltage remains at 12V
  pulse when I add R8. So unlike in simulation R8 didn't change the
  output voltage.


The simulation model will likely have a typical current transfer ratio of based on the data sheet and your real test may be using an opto isolator with a very high CTR. With a very high CTR the output opto-transistor remains saturated and you largely get the same output peak-to-peak voltage as you got when you didn't load with the extra 2k2 resistor.

The minimum CTR for the 4N26 is 20% but typically this can be 50% and if you had a really good one it could be a lot higher such as over 100%. The model parameter can be changed and you should be able to resimulate and obtain a result that is closer to what you measured.