I tested it out with Windows 10 (RS5, 1809) in a VM.
I first created a folder "C:\My Data" in the root of a clean install, and then reinstalled (*1st re-install) from within Windows, choosing the "Keep nothing" option.
"C:\My Data" was left untouched. It also created a windows.old folder which contained only a Users folder from previous installation, which got me more curious, so I then created folders in few other locations:
C:\Users\My Data, C:\Users\Me\My Data, C:\Windows\My Data, C:\Program Files\My Data
And then reinstalled the same way again.
C:\Windows\My Data, C:\Program Files\My Data were gone.
But the C:\Users, containing C:\Users\My Data and C:\Users\Me\My Data was backed up in Windows.old
Also the Windows.old from the *1st re-install was also gone, and replaced by the above Windows.old (containing the newer Users folder)
So it seems it removes only windows-related folders, i.e. C:\Windows, C:\Program Files etc., leaves anything else untouched, and also backs up your C:\Users in Windows.old, and any older Windows.old is removed also.