The motivation behind a law is pretty much irrelevant. To say that no laws can be passed and no regulations issued unless they are pure of political calculation is to say that no laws can ever be passed and no regulations can ever be issued. Rather our system is a set of ground rules about the procedures to be used to arrive at laws that bind us and a set of principles that constrain what those laws can do. If it was adopted in a procedurally correct manner and does not violate Constitutional bright lines, then it is the law, even if it was motivated by political gain or required political horse trading to get passed.
The motivation argument is basically flawed as it allows a policy to be enacted if done so by one politician who is acting pure of heart, but rejects the same exact regulation if adopted by politicians acting out of self interest. This bizarre result undercuts our whole system of law.
The citizenship question was asked before for over 50 years.There were also more detailed questions about nations of origin and languages spoken in the house. These are not in the current census quesrion proposal. The citizen question has substantial precedent and a wide variety of legitimate uses. It is Constitutional. It may have political motivation, but so what: all regulations do.