Before his conversion Paul had certainly preached circumcision; he had been in complete agreement with the Judaizers, indeed he had been an outstanding proponent of their doctrine. He knew their arguments well and he understood all the implications of their teaching.
We are not to be fair weather Christians; we are called to confess Christ in all circumstances. The one who turns back in the face of difficulties is not fit for the kingdom of heaven; he shows that his love has no depth to it. If Paul was willing to compromise, there would have been no need to suffer persecution. He could simply adopt the policy of teaching what he wanted to teach when all was calm, and yield the point when he was under attack. But such a policy was an abomination to him. The Lord requires faithfulness, loyalty, and constant adherence to the truth from us, even when it costs us dear.