The Fourth Meditation, subtitled "Truth and falsity," opens with the Meditator reflecting on the ground he has covered so far, observing that all his certain knowledge, and in particular the most certain knowledge that God exists, comes from the intellect, and not from the senses or the imagination. Now that he is certain of God's existence, a great deal more can follow. First, he knows that God would not deceive him, since the will to deceive is a sign of weakness or malice, and God's perfection would not allow it. Second, if God created him, God is responsible for his judgment, and so his faculty of judgment must be infallible so long as he uses it correctly.
This is all well and good, the Meditator reasons, but if God has endowed him with infallible judgment, how is it that he can be mistaken, as he undoubtedly is from time to time? The Meditator explains that he finds himself somewhere between God--a perfect, complete, and supreme being--and nothingness. He was created by a supreme and infinite being, and all created in him by that supreme being is infallible, but he was also created to be only a finite being. While he participates partly in the supreme being of God, he also participates partly in nothingness. When he is wrong, it is not the result of some faulty faculty created by God, but is rather the result of his non-being, his lack of perfection. Everything that God has created is perfect, but God has created the Meditator as a finite being whose finitude still leaves room for error.
But the Meditator remains unsatisfied. If God is a perfect creator, God should be able to create perfect beings. Surely, God could have willed it so that the Meditator would never err, and God always wills what is best. The Meditator reflects that God's motives and reasons are incomprehensible to finite beings such as himself. For this reason also, he rejects the search for final causes in physics: it would require a great deal of arrogance to try to read God's mind or understand God's motives. Rather than look at one isolated part of the universe, the Meditator suggests he might find perfection if he looks at God's creation as a whole. He may appear to be an imperfect being when considered on his own, but he may play a perfectly appropriate role in the wider context of a perfect universe.
In Descartes' denial that God could be a deceiver, he is employing a conception of power and existence that would have been familiar in his day, but which might strike us as rather odd today. Existence and the power to act are both conceived by Descartes to be positives. The more power and existence one has, the better one is. Evil and negative acts are not a result of some negative being that counterbalances positive being, but result rather from a lack of being. In being supremely good, God must also have infinite being and infinite power, since these are associated with goodness. An act of deception is an act of falsity, and falsity deals with what is not. Thus, by Descartes' reasoning, God cannot be a deceiver since he is supremely real and does not participate in any way in nothingness. People, on the other hand, are understood by Descartes to have finite being, and that their lack of infinite being implies that they also participate in nothingness. If there were a line, with God as absolute being on one end, and nothingness and evil on the other end, humans would be somewhere in the middle. Our ability to err comes to us insofar as we participate in nothingness rather than in God.
To better understand why Descartes has this conception of good and existence would require a better understanding of the history of ethics. Briefly: Descartes is inheriting an ancient Greek conception of virtue, where what is real, what is true, and what is good are all closely linked. Being good is simply a matter of participating in what is real, and being evil is linked with unreality. The Greek philosophical world was one with a teleology, in which there was reason and purpose in the very workings of the world; being good was seen to be simply a matter of approximating this reality. Descartes is still entrenched in the ancient worldview that he inherited from the Scholastics. This worldview has changed since, as we find in later philosophers like Kant. According to Kant, reason and purpose are things that we apply to the world. Thus, goodness is an idea that our reason imposes upon a morally neutral universe. It is Kant's worldview that we now understand, and it is often difficult to understand a worldview where goodness and existence are considered one and the same.
The Meditator also questions why a supremely good God would not create us with infinite being. In sum, we are given a variant on the answer, "The Lord works in mysterious ways." The Meditator suggests that God's motives are beyond our meager comprehension. While on our own, we may be seen as imperfect, we are only a small part of a much larger creation. We might think of a steering wheel on its own as rather useless and imperfect, but when we see it in the larger context of a car, we understand that it is perfectly designed to suit its purpose.