Switch Configuration for Variable Gain Photodiode Amplifier
Imagine a series resistance Rs in S1 normally closed contact. The current If flowing through the feedback resistor Rf1 will result in the voltage at the op-amp output being higher than the ideal voltage by Rs*If.
But the voltage at the right hand side of Rf1 will be unaffected (because it's inside the feedback loop).
If you add the second switch you can pick off that voltage and provided there is negligible current through the resistance of S2 (to the load) you will have eliminated all the error caused by the switch resistance.
For illustration, consider the below example where you have two switches with different resistances in each position.



simulate this circuit &ndash; Schematic created using CircuitLab
This dual-switch configuration is frequently useful when you have high resistance switches such as CMOS analog switches.