Within a constitutional government, those who govern are expected to follow the same laws as the citizens.
Postwar West Germany became occupied by the Allies, and thus became democratic and capitalist-based. The eastern side of Germany came under USSR rule.
It was mostly about historical circumstances. Sure, they chose to sign it, but not signing it would result in death probably for various reasons. Some came from areas with extreme poverty and famine so not signing would result in death. Others fled religious or legal persecution so they signed it so as to avoid going to jail or being executed. They chose to sign it but the alternative was not something that they wanted.