No one really says that in an absolute sense, it is always in context, what it usually means is "I trust a particular institution with the data they collect", not "I will give my credit card number to everyone who asks".
For example, let's say you approve of installing security cameras monitored by police in your residence, if you say "I have nothing to hide" what you are actually meaning is "there is nothing these cameras can see that I would want to hide from the police". I think it is obvious that it doesn't mean you approve of having the same cameras installed in your bathroom.
The real question is one of trust and risk assessment. Are the risks of revealing a piece of information worth it? how much do you trust the other party? not the literal meaning of "nothing to hide".
Often in this discussion it's about a society-wide standard. The benefit to "me" might be that e.g. the police can do their job well, hopefully protecting me from criminals, while sticking to reasonable and trusted privacy controls (e.g. intrusive data collection requires a court warrant, and I trust the courts enough to do a good job). That's very different to uploading all social media conversations logs to NSA because "nothing to hide".
Looping back to this article, it is unclear if there was ever ant good reason to record religion in Amsterdam. Nor would I exclusively blame administrative procedures on the Holocaust - though I'm sure it made matters worse.
You don't know who is going to get access to the data you have shared.