You take a risk by publicly aligning your business with one side of a contentious issue. But if done right, the move can pay off.