The existence of money and how it works has always been contradictory in Star Trek. Indeed, in the very episode that we were discussing earlier, "Measure of a Man" it ends with Picard asking Louvois out to dinner and her answering with, "Are you buying?" in which he nods in agreement.