Why did the Germans write the Nuremberg laws?

To take away the rights of the German Jews.