Challenged by the far right, mainstream Socialists and Republicans pick an unusual moment to embrace deregulation