You can be prosecuted for lying about race on the census, but it takes some pretty specific and narrow conditions and isn't a concern for the vast majority of people.
There are two analytically distinct questions.
The first is whether you can lie on the census about race. The answer is "yes", you can lie on the census about race. You would do so by providing an answer that is insincere, which is to say, an answer that is not consistent with how you self-identify. If you believe yourself to be and identify as African-American, for example, but answer "Alaska Native" not because you identify as an Alaska Native, but because you want to screw with the census, then you have lied about race on the census.
Similar issues of sincerity have been addressed by the U.S. Supreme Court in the context of the much higher stakes issue of conscientious objector status for someone seeking to avoid the draft. A 2014 law review article explores how courts test sincerity claims in practice.
The second is whether you can be prosecuted about lying on the census.
There is indeed a law that makes lying on a census form a crime.
Refusing to answer either the short Census form or the longer American Community Survey form is a violation of federal law (Title 13, United States Code, Section 221). Refusing to answer is punishable by a fine of $100, while giving false answers carries a fine of up to $500. (As a practical matter, the Census says fines of up to $5,000 can be imposed under Title 18, Section 3571.)
So, again, the answer is "yes" you can be prosecuted for lying on the census, but due to the obligation of the census to maintain confidentiality, knowing that a crime was committed or proving that you lied would be hard unless you did something to waive that right to confidentiality.
Still, the person about whom the confidential information is maintained by the census can waive this confidentiality. 13 USC 9(a)(3).
In practice, a prosecution for lying about race on the census would probably be most viable if, for example, you did a TV interview or posted a YouTube video in which you took video of yourself filling in the race item on your census form with an answer while stating that you didn't self-identify as this race but were just screwing with the government, and then showed yourself submitting that form.
Thus, while the prohibition against lying on the census about race is virtually toothless, it does have enough teeth to make it possible to prosecuted someone who openly and publicly defies the requirement to be truthful on the census and admits to doing so, which can still have some utility in discouraging some kinds of open revolts calculated at undermining the integrity of the census.
Also, even if you don't "admit" that you are insincere that isn't the end of the analysis. They can't dispute your self-identification with biological facts, but they can dispute that your answer is a sincere self-identification with either your own confession to the contrary or with circumstantial evidence that indicates you are lying (e.g. you fill out every other form before and after with a different answer and have a known animosity towards the census). If a jury believed beyond a reasonable doubt based upon circumstantial evidence that your answer was not sincere, it could find your testimony to be not credible and convict you anyway.
If there are no lies, what purpose is served by having such a
The vast majority of people, facing no negative consequences for telling the truth, if they have cooperated enough to fill out the form at all, will try to fill it out consistently with the instructions. And, a significant share of all census responses are provided by government employees whose duty and purpose is to try to provide a correct answer.
Also, most people comply with the laws even in the face of zero enforcement. For example, it has been more than 40 years since the last person was prosecuted for not filling out a census form, even though it is crime not to do so, in part, because most people try to obey the law. And, compliance with the burden of filling out a census form is quite high.
What's the value (who benefits) in making what used to be a fuzzy but
more or less factual item about national and ethnic origins into a
belief-based one, in effect making race into a religion.
Many countries (not the U.S.) have a religion question in their census as well, and this isn't problematic where it is done, or in surveys asking questions about religion, although being clear on definitions can be important (e.g. in the case of a religious v. ancestral or ethnic v. self-identified definition of who is a Jew).
I strongly suspect that the differences in how people respond to the question arising from a national or ethnic origin definition, and a definition based upon self-identification, are negligible at the statistical level. A century or so from now, when census records are made public, it will be possible to confirm this definitively by examining how the same individual's race was reported on half a dozen or more successive census forms. In non-census contexts, this shift in the definition has not produced any statistically meaningful differences in how people respond.
Also, if anything, the new definition based on self-identification may be more useful to researchers who are trying to examine socially coherent communities, and it makes the race data slightly more comparable to data, for example, on religion and on sexual orientation (from non-census sources).