That's a different issue. When a court orders you to do something, then they would tell you to go back home and get the passwords or allow you the ability to do that. It's not reasonable for border security to expect you to carry your passwords with you at all time for all the services you use. It's a security risk to you, from third parties which might want to steal your data. Like for instance robbers that might force you to divulge your banking information at gun point.
What does "reasonable" have to do with CBP? They can detain you for a surprisingly long time or deport you (complete with banning you from further entry if you're not actually a US national) for failure to comply.