The pasuk says regarding Yom Kippur:
שַׁבַּת שַׁבָּתוֹן הוּא לָכֶם וְעִנִּיתֶם אֶת נַפְשֹׁתֵיכֶם בְּתִשְׁעָה לַחֹדֶשׁ בָּעֶרֶב מֵעֶרֶב עַד עֶרֶב תִּשְׁבְּתוּ שַׁבַּתְּכֶם - It is a complete day of rest for you, and you shall afflict yourselves. On the ninth of the month in the evening, from evening to evening, you shall observe your rest day (23:32).
The Gemara in Pesachim 68b wonders since when do we fast on the 9th; we only fast on the 10th? The Gemara answers that it’s a mitzva to eat on the 9th. The Torah views someone who eats on the 9th as if he fasted on the ninth and the tenth.
There is a famous question asked by many: what is the Gemara’s diyuk (problem and solution)? We have this style of date in the Torah previously (i.e.בָּרִאשֹׁן בְּאַרְבָּעָה עָשָׂר יוֹם לַחֹדֶשׁ בָּעֶרֶב תֹּאכְלוּ מַצֹּת עַד יוֹם הָאֶחָד וְעֶשְׂרִים לַחֹדֶשׁ בָּעָרֶב – In the first [month], on the fourteenth day of the month in the evening, you shall eat matzos, until the twenty first day of the month in the evening. (Exodus 12:18) ), and the Gemara did not see fit to question why it says that we should eat matzos on the 14th if we really eat them from the 15th. So why only by Yom Kippur?
Rabbi Shlomo Gantzfried (author of the Kitzur Shulchan Aruch, biography here) answers with another famous question: how could the Patriarchs keep the whole Torah if they were still technically non-Jews, and there is a halacha that a non-Jew may not keep Shabbos?
One of the more accepted answers is by R’ Pinchas Halevi Horowitz (biography here) in Kiddushin 37b. He explains that there are two types of time spans: the Jewish calendar, where the night precedes the day, and the secular calendar, where the day precedes the night. The issur for a non-Jew to keep Shabbos, as explained in Sanhedrin 56b, is keeping Shabbos for a full 24 hours (not even necessarily on Saturday; it may even be a Monday). However, the pasuk in which this issur is mentioned is from Genesis 8:22 וְיוֹם וָלַיְלָה לֹא יִשְׁבֹּתוּ - “day and night shall not recede”. We see that their calendar starts from the morning. Therefore, the Patriarchs kept Shabbos as we Jews keep it-Friday night and Saturday day. However, on Motzaei Shabbos, they did a melocho, when it is still considered Shabbos for a non-Jew, as his Shabbos would only start in the morning. Thus, they never fully kept a Shabbos of a non-Jew.
With this wonderful concept, R’ Gantzfried explains how we can understand why the Gemara is specifically bothered with Yom Kippur and not with Pesach. Pesach was mentioned before Matan Torah (the pesukim about Pesach are whilst the Jews were still in Egypt); therefore, 14th at night means the night that actually comes after the day. However, when the Torah commands us about Yom Kippur, we are already in the Jewish calendar mode, thus 9th at night really means a full 24 hours before Yom Kippur.
Therefore, the question from the Gemara is entirely legitimate!