Original: Carstens joined the NSDAP in 1940, reportedly to avoid detrimental treatment when he was a law clerk.
Simplified: Carstens joined the Nazi Party in 1940. This was when he was a law clerk.