I know, but he was still human. And as long as he was on earth, he was still able to err.
Acts 11:1 Now the apostles and the brothers who were throughout Judea heard that the Gentiles also had received the word of God. 2 So when Peter went up to Jerusalem, the circumcision party criticized him, saying, 3 “You went to uncircumcised men and ate with them.” 4 But Peter began and explained it to them in order: 5 “I was in the city of Joppa praying, and in a trance I saw a vision…the voice answered a second time from heaven, ‘What God has made clean, do not call common.’…15 As I began to speak, the Holy Spirit fell on them just as on us at the beginning. 16 And I remembered the word of the Lord, how he said, ‘John baptized with water, but you will be baptized with the Holy Spirit.’ 17 If then God gave the same gift to them as he gave to us when we believed in the Lord Jesus Christ, who was I that I could stand in God’s way?” 18 When they heard these things they fell silent. And they glorified God, saying, “Then to the Gentiles also God has granted repentance that leads to life.”
Paul already withstood Judaizer confrontation and didn’t back down. He didn’t care about human respect here.
I’m sure we’ve all had the experience of successfully resisting a temptation, perhaps often enough to even thinking we’ve finally conquered the sin or failing — only later, in a weak moment or under stronger pressure, to cave in.