I believe it was because Peter stopped eating with the Gentiles , so Paul called him out on it...Barnabas followed Peter in his action , Peter was being a hypocrite...
...xox...
...xox...
1 Corinthians 9:19-23
19For though I be free from all men, yet have I made myself servant unto all, that I might gain the more. 20And unto the Jews I became as a Jew, that I might gain the Jews; to them that are under the law, as under the law, that I might gain them that are under the law; 21To them that are without law, as without law, (being not without law to God, but under the law to Christ,) that I might gain them that are without law. 22To the weak became I as weak, that I might gain the weak: I am made all things to all men, that I might by all means save some. 23And this I do for the gospel's sake, that I might be partaker thereof with you.
Also hypocrisy isn't a sin. I mean, it's obviously not good but sins are transgressions of God's laws which hypocrisy isn't. Sins are specific things like lying, stealing, murder, etc but hypocrisy isn't listed among those things.
Even Revelation 21:8 says nothing about hypocrisy.
Rev. 21:8
8But the fearful, and unbelieving, and the abominable, and murderers, and whoremongers, and sorcerers, and idolaters, and all liars, shall have their part in the lake which burneth with fire and brimstone: which is the second death.