Then when he says, "Be not deceived; God is not mocked," he forestalls an excuse.
He says, therefore: "Be not deceived; God is not mocked." This can be taken in two ways, according to the two explanations given above. According to the first, this way: You say that we ought to imitate our teachers even in good things, but I cannot imitate them save in the things they do; and the only thing I observe in them is evil. Therefore, I ought to imitate them in evil. But he dismisses this, when he says, "Be not deceived, God is not mocked". As if to say: It is erroneous to say this, for the evils of t...he prelates do not excuse us, because they are an example to their subjects only in those matters in which they imitate Christ, Who is the shepherd without sin. Hence he expressly says in John (10:11): "I am the good shepherd"; and the Apostle says in 1 Corinthians (4:16); (11:1): "Be imitators of me, as I also am of Christ." As if to say: Imitate me in those things in which I imitate Christ. And although you excuse yourself before men because of the evil acts of prelates, yet "God is not mocked," i.e., cannot be deceived: "Shall he be deceived as a man, with your deceitful dealings?" (Job 13:9). Hence it is said in Proverbs (3:34): "He shall scorn the scorners."
But according to the second explanation it is understood in the following manner. They could say: We are poor and have nothing to communicate. But he rejects this, saying, "Be not deceived", i.e., think not to excuse yourself in vain, by pretending poverty; "God is not mocked", i.e., cannot be deceived, for He knows our hearts and is not unaware of our possessions. A likely excuse may deceive a man and satisfy him; but it cannot deceive God.
Source: Commentary on Galatians