On Sept. 6, 1949, World War II veteran Howard Unruh gunned down 13 innocent people in East Camden. The night before, he had gone to a Market Street movie house and well-known gay pickup spot to meet a man. His date never showed up, but Unruh told investigators that other people from his neighborhood might have seen him at the theater.

Unruh had good reason to worry about that. In the Army, where homosexuality was cause for dishonorable discharge, suspected gays were given rectum examinations and “gag tests” with a tongue depressor; if you didn’t gag, you were assumed to be gay. And after Unruh returned from the war, New Jersey had enacted a so-called “sex psychopath” law allowing for indefinite incarceration of homosexuals.

We’ll never know what led to the rampage by Unruh, who was diagnosed as a schizophrenic and spent the rest of his life in Trenton Psychiatric Hospital. But New Jersey students probably won’t know about him, either, despite a new law requiring schools to address LGBT history.

That’s because the measure — like so much else in history instruction — is designed to make people feel good. To quote one supporter, it aims to provide “positive representations” of gay people. And that’s a formula for distortion, not education.

I recognize — and deplore — the enormous amount of harassment, bullying, and violence that gay students face every day. And of course all children should learn about the role of sexual minorities in American history, just as they should learn about different races, ethnicities, and religions.

But history isn’t therapy; its goal should always be understanding, not well-being. Once we decide to use the past as a salve for our present-day woes, historical truth goes out the window.

During the civil rights era, African Americans demanded inclusion in history textbooks that had either ignored or denigrated them. In Brown v. Board of Education, the Supreme Court declared that racial segregation generates “feelings of inferiority” in black children. Activists made similar claims about racist textbooks, which allegedly damaged black psyches.

These campaigns helped revise textbooks that falsely depicted slavery as a benevolent institution, Africans as violent savages, and much else. But the new histories imposed distortions of their own, all in the service of enhancing self-esteem.

So while slavery was now condemned, textbooks rarely mentioned that Africans had practiced it as well. Nor did the books address the brutal oppression of Native Americans by Spanish colonialists, which might offend Latino students.

Eventually, whites started to argue that honest accounts of racial injustice would harm their own children’s fragile minds. “Education is getting a positive image about oneself,” one Michigan parent complained in 1974, condemning a textbook that described white attacks on blacks during the Chicago Race Riot of 1919. “No child, white or black, will get a positive image by reading about stabbings, war, the problems.”

The result was a history of race without racism, and of diversity without debate. Eventually, almost every group got included in the grand national story. But we only taught the good parts, lest anyone suffer offense or pain.

You can’t have real history that way. Of course our schools should teach about gays and lesbians, who have been excluded and disparaged for too long. But nobody should get a free pass, or a clean slate. That condescends to people, all in the guise of protecting them.

So when we teach about gay heroes like Walt Whitman, who also lived in Camden, let’s tell the story of Howard Unruh as well. It won’t be pretty, and it certainly won’t make us feel good. But it will be true.

Jonathan Zimmerman teaches education and history at the University of Pennsylvania. He is the author (with Emily Robertson) of “The Case for Contention: Teaching Controversial Issues in American Schools” (University of Chicago Press).