The staged attenuator circuit relies on the property that the attenuation of one stage does not depend upon the attenuation of the other stages. This is accomplished by designing the stages in such a way that their output resistance is independent on their switch position.
Lets design a single stage of an attenuator, around one switch: