In the case of maritime travel, this is actually the law of the seas, as discussed in the article. Whether it's true or not that you have "nothing to hide", you are not allowed to sail "under the radar". Same as how you are mostly not allowed to fly without a transponder.