I just edited that last tine because it mentioned the - input twice
The follower here has no resistor, or rather it's a wire link which is very low resistance.
If you put a resistor in the follower feedback path (from U2 - input to U2 output) then the whole thing does something completely different. Then you add gain so the output has to move when the input stage follows the input voltage - when it goes lower than the stored value. It'll be pretty useless as a peak detector as the lowest voltage it outputs will be the positive value
Let me go through it with an extra resistor in the U2 follower stage.
Lets start with the input to the whole thing being made instantly more positive than the voltage stored on the capacitor and that U2 was stable with its two inputs the same voltage - so the resistor R in the diagram biases the input to U1 to be lower than the input causing U1 output to go up, which increases the voltage on the capacitor via the diode from U1 output to the capacitor. Now U2 hasn't got both inputs the same so it tries to compensate by..
rule 2. Highest input voltage pin is the + input so output goes high.
Now U2 output has to go to the capacitor voltage for 1. to be true - which it will. At this point it doesn't seem much different..
The other case is when the input to the whole thing is lower than the voltage on the capacitor. In this case the output of U1 will go low until it makes the U1 feedback diode conduct, at which point the - input will match the + input (of U1), BUT....
drum roll....
Because the two inputs to U1 are now the same >and lower than the stored voltage< the original R is connected to the store voltage on U2 (because U2 has to obey rule 1 to make its inputs the same voltage) so poor old U2 has to make its output go high to compensate. In other words, at this point, the inputs to U2 are such that the + input is the highest and so the output will go high; and that means higher than the stored voltage.
I hope that doesn't sound like an alien language