The Selichot for Asarah b'Tevet contain a reference to the dream of the baker interpreted by Yosef in Bereshit 40 and here are some rabbinic commentaries that may shed light on why it is referenced.
אבותי: אְָמְרוּ לְכוּ נְכַלֵּם וְנַשְׁבִּיתָה זִכְרָם. אֵל קַנֹּא וְנוֹקֵם גָּמְלֵם יִשְׂאוּ אֶת שִׁבְרָם. כְּמַעֲשֵׂיהֶם שַׁלֵּם וְיֵבֹשׁוּ מִשִּׂבְרָם. כְּאִישׁ חֲלוֹם חוֹלֵם שְׁלֹשָׁה סַלֵּי חוֹרִי.
They said, "Let's go destroy them and end their memory." Jealous, vengeful God, repay them, make them carry their destruction. Pay them in accordance with their deeds, make them too ashamed to hope, like a man dreaming a dream about three baskets of bread.
(טז) וַיַּ֥רְא שַׂר־הָאֹפִ֖ים כִּ֣י ט֣וֹב פָּתָ֑ר וַיֹּ֙אמֶר֙ אֶל־יוֹסֵ֔ף אַף־אֲנִי֙ בַּחֲלוֹמִ֔י וְהִנֵּ֗ה שְׁלֹשָׁ֛ה סַלֵּ֥י חֹרִ֖י עַל־רֹאשִֽׁי׃
(16) When the chief baker saw how favorably he had interpreted, he said to Joseph, “In my dream, similarly, there were three openwork baskets on my head.
כי טוב פתר אמר אונקלוס (תרגום אונקלוס על בראשית מ׳:ט״ז) כי יפה פתר וכן טוב טעם ודעת למדני (תהלים קיט סו) וכן כי טובות הנה (בראשית ו׳:ב׳) יפות והטעם לאמר כן כי האיש הזה מבזה על יוסף חושב בו שלא ידע לפתור אותו לעולם ולא יגיד לו החלום אם לא בראותו כי פתר לחברו יפה וכהוגן או יאמר וירא שר האופים כי לטובה פתר לו ושמח והגיד חלומו שהיה מצטער בו יותר מחברו:
THAT THE INTERPRETATION WAS GOOD. Onkelos rendered it that he interpreted it well. A similar use is found in the verses: Teach me fair discernment and knowledge; That they were ‘tovoth’ (fair), which means “pretty.” The intent of the verse is to state that this man [the lord of the bakers] had scorned Joseph, thinking of him as not ever knowing how to interpret the dream, and he would never have told him the dream had he not seen that he interpreted for his friend in a fair and proper manner. It may be that the verse is saying: “And the lord of the bakers saw that he gave a favorable interpretation to the lord of the butlers and he rejoiced. He then told him his own dream which had caused him more anguish than that of his friend.”
או ירצה על זה הדרך כי טוב דבר לו בפתרונו וכאלו אמר כי פתר טוב ולא רע וחשב שאולי גם אותו יבשר בשורה טובה, ותקותו מפח נפש כי הראוהו הגלות של ישראל אשר יאכלו העמים הנמשלים לעופות כאומרו (לעיל ט"ו י"א ותרגום יונתן שם) וירד העיט על הפגרים, את ישראל הרמוזים ללחם דכתיב (תהילים י״ד:ד׳) אוכלי עמי אכלו לחם, גם רמז באומרו על ראשי כי ישראל הם עליונים על כל העמים, ותמצא שבחלום שר המשקים לא הזכיר ששתה פרעה את הכוס אלא נתינתו בידו לכבוד ולמעלה מה שאין כן חלום שר האופים שהגיד אכילת העופות מן הסל:
The words טוב פתר could also mean that Joseph had given a favourable interpretation to the dream of the chief butler. Thus encouraged, the chief of the bakers told Joseph his own dream hoping that Joseph would have a favourable interpretation for him also. His hope was based on the prophecy of Jewish exile that the dream contained. He saw the nations of the world who are compared to vultures consume the Jewish people (compare Targum Yonathan on Genesis 15,11). Israel, on the other hand, is compared to bread as we know from Psalms 14,4: אוכלי עמי אכלו לחם, "who devour My people as they devour bread." When the chief of the bakers spoke about carrying the baskets על ראשי, on my head, he hinted that Israel would be on top of all the nations. You will note that in the description of Pharaoh's activities in the dream of the chief butler, he is not described as drinking the wine, i.e. consuming the Jewish people. He only held the wine in his hand, an expression of paying homage to its worth. Contrast this with the fact that in the dream of the chief of the bakers, Pharaoh, i.e. the vultures, are reported as consuming part of the Jewish people.
(יח) וַיַּ֤עַן יוֹסֵף֙ וַיֹּ֔אמֶר זֶ֖ה פִּתְרֹנ֑וֹ שְׁלֹ֙שֶׁת֙ הַסַּלִּ֔ים שְׁלֹ֥שֶׁת יָמִ֖ים הֵֽם׃
(18) Joseph answered, “This is its interpretation: The three baskets are three days.
ויען יוסף, אמר גם לזה שלשה ימים כי גם המעשה הזה היה מהיר ומתוקן לפני פרעה כמו היין אלא שלא הביא המאכל לפני פרעה, ומזה הבין יוסף כי לא ישיבהו פרעה על כנו, ואם כן יהיה דינו להריגה,
ויען יוסף, he said that also what was forecast for the baker would occur in three days. The goods in the baskets are also of the type which are prepared in a hurry and which taste well only as long as they are fresh, and would not be served to Pharaoh when stale. The principal difference between the two dreams was that the baker did not see himself serving these pastries to Pharaoh, as opposed to the cup-bearer who featured so prominently in his dream. This detail convinced Joseph that the baker would not be restored to his position. Seeing that the alternative to a pardon was only execution, he said to the baker:

