The Evangelist unmasks the deceit when he adds, This he said, not that he cared for the poor but because he was a thief. For he was not interested in helping the poor - "The hearts of the wicked are cruel" (Prv 12:10) - but because he was a thief, and accustomed to stealing, he was pained that the use of the ointment had deprived him of an opportunity to steal, and it was this avarice that led to the betrayal, for we read: "Nothing is more wicked than the covetous man" (Sir 10:9); and "The thief comes only to steal and kill and destroy" (10:10). He had the opportunity to steal for he had the m...oney box, that is, he was in charge of our Lord's purse, and he used to take what was put into it, i.e., whatever was donated by the faithful for Christ's use and for the poor he carried as a duty, but carried off as a thief.
Two things can be noted here. First, that Christ lived on alms as a poor person: "As for me, I am poor and needy" (Ps 40:17). Secondly, it is not opposed to perfection to keep alms in a money box. Thus what we read in Matthew (6:34), "Do not be anxious about tomorrow," does not forbid one from saving for tomorrow, since our Lord did this very thing, and he is the supreme model of perfection.
One might ask why our Lord, since he knew that Judas was a thief, entrusted him with the money box? This can be answered in three ways. First, according to Augustine, Christ did this so that his Church would be patient when it was robbed; for one is not good if he cannot endure those who are evil. Thus we read: "As a lily among brambles, so is my love among maidens" (Song 2:2). Secondly, our Lord entrusted him with the money box to lessen his danger of final damnation, because he could then satisfy his greed from the money box. But as it is said: "He who loves money will not be satisfied with money" (Eccl 5:10). Thirdly, according to others, he did this in order to teach us that spiritual things should be entrusted to those who are more worthy, and temporal things should be entrusted to the less worthy. Thus the Apostles said: "It is not right that we should give up preaching the word of God to serve tables" (Acts 6:2), and they entrusted this work to one of the deacons.
But why does it say here that only Judas said this when the ointment was poured out, while Matthew says that the disciples said this? One reply is that Matthew uses the plural for the singular, as he also did in "Those who sought the child's life are dead" (2:20). Or, one might answer that Judas was the first to grumble and that this incited the others to say the same, although not from the same motive.
Source: Commentary on John