Honestly, I loved every other part of their subplot, but that scene really bugged me. I thought it was way too hamfisted and probably didn't need to be spelled out in the text. Even after a second viewing (where most of my quibbles with the pacing evaporated) that scene still bugged me.
Personally, I think their subplot needed that scene. The way both characters are, they keep their emotions pretty hidden so if they didn't have that scene, it might have seemed to come out of nowhere at the end for some people to see Rocket being sad that Yondu decides to sacrifice himself and at the funeral when you pan out from Rocket's sad look. I think what did it for me was the scene in a cell because you can see how they are both kind of cautiously feeling each other out to see what the other's motive is. It was a pretty subtle scene because it's not an outwardly emotional scene at all, but the way they feel out the other person and their intentions under the veil of sarcasm and joking makes it interesting to see them build up respect for one another. Even the way Rocket asks about why Yondu didn't give Peter to Ego was because Rocket actually cares and was trying to find out what this guy's real motives were and Yondu gives him the "because he's skinny and can fit into small places" line that Rocket knew was bullshit, but he let's it go because he knew it was because he cared for him.
Honestly, Yondu and Rocket's dynamic was good the first time I saw it but it was soo much better the second time I saw it, because everyone has a sort of bittersweet moment mourning the loss of their friend but they all had gotten to grow a bit in their journey and had found a little bit of happiness connecting with others. Rocket is bawling on the inside because he realized he lost someone that really understood him, and at the end of the film, he's still that cranky dude that shuts everyone out and he still feels alone, standing by himself out in front of everyone while literally being surrounded by people who care about him, even though he's a jerk to them.
All that is not spelled out in the text, in fact, and I sort of missed it the first time because obviously they had that moment on the ship and Rocket is like "yeah, shit, I guess you are like me. Damn, I don't want to see you go now." but I didn't think about how much that must have resonated with Rocket. The whole "you are just like me" speech is a bit of a cliche, but it's been Rocket's arc through the first film and this one; he's a jerk to everyone and Groot was his only friend in the entire universe. Now he has other friends but even then he doesn't treat them great. The way he stuns Gamora when she wants to run out and save Quill was pretty selfish, even if he thinks it's in her best interest to keep her from dying as well. Rocket is such a tragic character, it's hard not to pity him even when he makes poor decisions. Everyone else in the Guardians has begun the healing process of their past traumas but I'm not sure Rocket is ready yet.
Going back to the scene you mentioned, I think that's why that had to be made explicit, not just for a cool scene between the two characters, but because Rocket needed someone who really understood him to yell at him to snap out of it, to tell him to stop pushing people away before it's too late. I think Yondu kind of needed it as well, like that was his moment of stepping up and being a dad to Quill.