He hath already revealed unto you in the Scripture that, when ye hear the revelations of Allah rejected and derided, (ye) sit not with them (who disbelieve and mock) until they engage in some other conversation. Lo! in that case (if ye stayed) ye would be like unto them. Lo! Allah will gather hypocrites and disbelievers, all together, into hell;
A person who claims to be a believer but then sits with those who insult God is showing him or herself to be a hypocrite. Ibn Kathir, in his monumental work of commentary, offered the following saying of the Prophet to show that this ban can theoretically be extended to sitting with those who disobey God’s laws, and who thus mock the revelations of God indirectly. “One who believes in God and the Last Day should not sit down to eat in a place where liquor is being served.”
Emerick, Yahiya. The Meaning of the Holy Qur’an in Today’s English (p. 829). Unknown. Kindle Edition.