You need to understand something about "momentum" in police investigations.
The police are already 100% convinced by their investigation (mostly guessing) that this guy is a child rapist. There is literally nothing he can do to change this opinion. So, for the police, this is now about "pinning" a charge on him.
Since they are already convinced of his guilt, any new evidence the police obtain will be used to pin SOMETHING on this guy, even if has nothing to do with the original charge. So it's possible that there is no child porn on the partition, but if there is pirate software or whatever they will charge him with theft, etc. all the while telling the judge he's really a child rapist. Or worse, they'll lie and claim they found child porn on the computer.
Not giving the password actually protects him from (likely) false evidence because his defense can show they haven't been able to encrypt the data. IOW, it limits their ability to plant evidence somewhat.
Even if you think the above scenario is paranoid and unlikely, it doesn't change the fact that it's probably his best strategy whether he's guilty or innocent of the specific charge.