It seems weird for the government to collect data useful for research, but then to gate access based on the viewpoints of potential users. This restriction doesn't support the search for truth.

Whatever people think of Lasker (Cremieux) and his views, isn't data being available to all interested parties the best way to find the truth?

The article mentions this towards the very end:

Adam Candeub, the top lawyer at the Federal Communications Commission, wrote a law review article in 2024 criticizing the N.I.H.’s discouragement of stigmatizing research. He compared it to the persecution of Galileo.
“A liberal society should support the search for truth,” Mr. Candeub wrote, “regardless of how uncomfortable and unsettling that truth turns out to be.”

There's a lot of problems with this perspective, but a very simple pragmatic one is that these data sets depend on volunteer consent, which will be withheld if people believe their contributed data will be used this way. At the end of the day, human consent is the paramount concern.

I was with you until the last sentence.

But I went to the ABCD Study web site, and read the article they link about ethical use of data (Responsible use of population neuroscience data: Towards standards of accountability and integrity).

I didn't get the impression that consent (for this study or future ones) is the reason they gatekeep the data.

It doesn't really matter whether we agree with the principles in their ethics guide, because they form part of the commitment made with human subjects who participated. If the guidelines said that every scientist handling the data had to do so while wearing a rubber clown nose, that too would bind!