Why wouldn’t it be legal to view it.
It’s illegal to possess it, download it or otherwise store it.
So it’s not necessary to criminalize the viewing, since all of the activities leading up to that viewing are illegal.
You can watch it without downloading it.
I used to do my computer stuff at an Internet cafe, and a guy was downloading kiddie porn at one of the computers. The guy next to him saw him doing it and called the cops.
They were there in seconds. Grabbed the guy, secured the computer, left a female cop there to watch the computer so no one messed with it, and went to get the cyber squad or whatever it’s called.
Similarly its not actually illegal to take drugs, even hefty class A major addictive substances. Its illegal to trade in them, to own them, to distribute them and make them, but not actually to take them.