Placement of MOSFETs in switchable voltage divider for voltage measurements
What can be the reason to put the MOSFET in the middle and are there
situations when one version has to be prefered to the other?

Putting the MOSFET &quot;in the middle&quot; is totally ineffective as a means of measuring the voltage U_BAT because the MOSFET acts like a source follower and the source voltage becomes whatever voltage is on the gate minus a 1 or 2 volts. Totally NOT reflective of U_BAT.
Putting a MOSFET &quot;at the bottom&quot; does actually guarantee your potential divider does its job with tiny on-resistance errors that are usually so minor they can be discarded. However, when the MOSFET is inactive, you have to be careful that R4 is large enough to prevent significant currents into your MCU pin from U_BAT.
The generally preferred method is a MOSFET &quot;at the top&quot; but that comes with extra circuit complexity: -

Picture from here. Now, the &quot;undesirable&quot; and somewhat unpredictable current flow into the MCU measurement pin is eradicated.