Sefer Daas Zekeinim (Ois 13) quotes Rav Yehoshua of Belz zy”a as asking why the Gemara says that one who eats on the ninth day “is considered like he fasted on the ninth and 10th days.” Why does it say that “it is considered” like he fasted on the 10th day, when he did, in fact, fast on that day? It seemingly should say that it is considered “like he also fasted on the ninth day.”
He answers by citing the words we recite in the tefillah at the end of the fast day: “May it be your will that the lessening of my fat and blood that was decreased today should be considered like the fat of animals offered on the Mizbeach, and it should find favor for us.” Korbanos are only brought from fat and blood from a kosher, pure animal. Therefore, if one does not eat l’sheim shomayim, rather he eats to satisfy his desires, his fat and blood are not pure and cannot be considered like a korban.
Since Hashem is merciful and desires our benefit, he wants our fast to find favor by Him. Therefore, He commands us to eat and drink on Erev Yom Kippur, knowing that the fat and blood we gain from this eating will be pure as each bite is a mitzvah. Therefore, the fat and blood we lose on Yom Kippur will be pure and fitting to serve as a korban. Thus, the eating on the ninth day is what uplifts the fasting on the 10th day and makes it desirable to Hashem.