Opposition to a contentious bill caused tens of thousands of protesters to gather outside New Zealand parliament on Tuesday.