The gemara is trying to figure out how one can make shehechiyanu on a cup of wine on Yom Kippur. The gemara suggests making shehechiyanu immediately before the start of Y.K., to which the gemara says that the bracha is an acceptance of the day and one could not drink after making the bracha. The gemara suggests the option of making shehechiyanu and leaving the cup without drinking, to which it responds - המברך צריך שיטעום. The gemara finally suggest giving to a child, to which it says that it will train him to drink on Y.K. and he may continue to do so as an adult. Rashi points out that the implication of the gemara is that giving the wine to a child would not violate the המברך צריך שיטעום, from the fact that the gemara needs to find another problem with the suggestion to give it to a child, rather than repeat the point of המברך צריך שיטעום. Rashi writes that the halacha of drinking from the cup is simply that someone must drink, but it doesn't need to be the one who made the bracha. The purpose of drinking from the cup is that if one would make borei pri hagafen without drinking, it would be degrading to the כוס של ברכה. The Rashash points out that Rashi seems strange because he seems to confuse the cause and effect. The reason that one must make a borei pri hagafen is because המברך צריך שיטעום, therefore he must make a bracha to drink. Rashi presents it as if the reason one must drink is because making a בורא פרי הגפן without drinking would be degrading to the cup. Another way to express the issue is that rather than focusing on degrading the cup which at worst would be a d'rabonon problem, Rashi should focus on the borei pri hagafen being l'vatala which is certainly more severe and according to the Rambam even a d'oraysa problem?
There are achronim who deduce from Rashi that even if there was not a halacha demanding that one drink from the cup, they would still make a בורא פרי הגפן. The rationale is that the bracha of borei pri hagafen in the context of a kos shel bracha, doesn't merely serve the function of a ברכת הנהנין. Rather it becomes part and parcel of the brichas hamitzvah. Just as on shabbos morning when the kiddush consists of nothing but a borei pri hagafen, one can be motzi others even if the me'vareich already made hagafen because it is a birchas hamitzvah. The same would be true for the bore pri hagafen made in the context of any kos shel bracha. Therefore, the bore pri hagafen is essential to the kos shel bracha, not just a prerequisite to enable one to drink from the wine. Rashi just comments that once hagafen is made on the cup, it is a bizayon to leave the cup without someone drinking from it.