Peter is an interesting guy. One day I wouldn’t mind studying up on him a little. He’s such a passionate guy but he’s also prone to being pushed one way or another by his moods. Nothing exemplified this more than when he claimed that he would never leave Jesus and then denied him 3 times. So it is no shock that even after Christ’s ascension, Peter steps in it again.
He was eating with the Gentiles until someone from the “circumcision group” (Judaizers) came along and made him feel guilty about it. So he pulled back and Paul rebuked him in front of everyone. That might sound a bit harsh, but I think Paul needed to make a point. The Gospel does not rely on religious acts or traditions. It is Christ alone, and his grace is a free gift offered to the Gentiles and Jews alike.
Peter was no stranger to rebuke from Jesus, but I think Paul brings this up so that he can show that he has authority as an apostle (Peter’s peer) and is not looking to curry favor with men. If he was only trying to please people, he would have gone along with anything Peter or other “important people” might have done or said.