It seems like a roundabout way of squashing speech. Make the citizenry aware that they will look through your social media accounts, and it causes the citizenry to automatically self-censor themselves. Yes I know it's talking about foreign travelers, but the citizen who reads about this probably can see the metaphorical cop glancing at him saying "You're next.".
Self-censorship is amazing though, before the European refugee crisis, it seems Germans were polite or tolerant towards foreigners, because it's the social norm. Now in some cities, because they know their neighbors think the same about "those people", they've also realized they're free to express their negative views.
Since they'll probably say "Please kindly write down your HN username", hello to the nice immigration officer reading this!