How does this circuit work? I can't reproduce the results in real life
This circuit has no relevant application shown here, but is basically a positive clamp circuit with the lower diode while the upper diode serves no purpose if the input is logic level 0,5 and the pullup V+=5V since the upper diode never gets forward biased into conduction.

But the simulation is good even showing the leakage current of the diode ( based on diode forward voltage @ 1A). 

The simulator voltage probes are infinite resistance, while yours are not.   In reality your probe may be 1 MOhm so the decay rate is to ground is 1uF*1Meg = 1 sec (63% decay)

If you used 10uF or more, you can see the result last long.

In future consider the real characteristics of battery ESR, Cap ESR , probe resistance when using Falstad and include them in your model when it matters and don't forget about probe loading on capacitor decay time constants. 

You can even simulate load capacitance of twisted wire pairs if you remember 40 pF/m and 1uH/m with coax being around 100 pF/m. They also have many standard filters, Op Amp circuits as well as arc gap components and basic logic but with 0 ohm output impedance so add 200 for high voltage CMOS, 50 for 74HC and 25 Ohms for 74ACL logic if that matters.

Falstad has a File> export link option to show your precise simulation, which I duplicated... showing the same circuit without the diode leakage to +5V and a switch you can enable to show the effects of a 1MOhm probe.