The musical episode features the Spock/Christine breakup and it happens in a shockingly humiliating and horrific manner for Spock, making a public spectacle of how she is leaving him and leaving Enterprise and didn't even tell him that she was departing until nearly everyone else knew -- except it's not totally Christine's fault.
Christine applied for a fellowship and got in, but held off on telling Spock, wanting to break up with him privately and personally, only to be unexpectedly feted in the crew lounge by friends who were present when she first received the news. She isn't happy about the celebration because there's currently a crisis and she hasn't had a chance to speak with Spock.
Spock sees her and asks why she didn't tell him that she is ending her time on Enterprise and their relationship as well. Christine asks to speak privately, but Spock, needing to trigger a song for more data to resolve the musical security crisis, elects to ask Christine to explain herself in the lounge with a large number of crew present to witness it.
Christine proceeds to belt out a lengthy song with dance accompaniment about how the fellowship is freedom and ambition, and the song indicates that Spock doesn't even factor into Christine's considerations except an afterthought comment about how she wouldn't hesitate to ditch him for a great job. It's not that she contemplated what it would mean to leave him, she flat-out didn't spare him a moment of thought.
Spock been humiliated in front of his shipmates, treated as a joke and an irrelevance in the most insulting fashion possible. He has sacrificed his own dignity and self-esteem to save everyone else's. I've followed Spock's career across TV, movies, novels and comics and I think this is one of the most heroic things Spock ever did. Yes, he died saving the crew in WRATH OF KHAN, but in "Subspace Rhapsody", he has to watch Christine crush every hope he ever had for their romantic relationship in public in a mortifyingly embarrassing display for all to see, and continue face his crewmates after that.
Christine is dismissive and hurtful towards Spock. It's only understandable because the music is making Christine say private things in public, and also because in "Those Old Scientists", where she found out from Boimler that the future Spock will close off his human side, confirming that Christine and Spock's romance has no future.
It's understandable that after that, Christine realized she couldn't let her not-to-last relationship with Spock be a factor in her career decisions. At the same time, due to Christine's withdrawal and silence, and due to Spock refusing to go somewhere private to discuss it (for scientific reasons), Spock is humiliated in full view of the crew happily celebrating how Christine is dumping Spock.
It is a grotesque scene. And without the musical situation where Christine is genuinely not able to moderate and control her emotional expressions and Spock is deliberately triggering them to restore everyone else's privacy, Christine would be a complete monster to behave this way. The musical plot device was essential for making sure there was some outside force to justify otherwise unforgivable behaviour.
It's also quite a moment that really demonstrates why Spock is such an icon and a beloved figure of STAR TREK. He will give up his own dignity to save ours. Spock truly is our friend.