*Even though Beyer's dissent included evidence to support that such laws protect children, I am not aware of any exception to the first amendment based on efficacy of results.
Supreme Court precedent holds that laws affecting speech will be upheld -- even in the absence of an "exception" -- if they are narrowly tailored to serve a "compelling government interest." See the beginning of Section III of the majority opinion, on page 11.
Breyer's citation to the psychological evidence is relevant to that point. I agree with the majority that it falls very far from meeting the high burden the government needs to satisfy under strict scrutiny (and there are other problems with the statute and Breyer's analysis in my opinion), but I don't think that makes it illegitimate or ideological. (Though apparently some of that evidence was not in the record.)