One of my favourite parts of Stephen and Jack's relationship is how it plays across lines of authority. When Stephen's a guest or they're on land, it's much less present (although there's an interesting flip where Jack's completely, ha, out to sea on land, whereas Stephen has much greater authority), but when they're out as usual with Stephen acting as the surgeon and Jack as the captain, they always end up having to thread this careful line where they can be friends, but not too friendly.
At least so far (Desolation Island), they're in a place where Jack sort of brings the people, and Stephen talks the Admiralty into acquiring them a boat. Jack is passed over until Stephen enters the picture, and then as the Home Office needs Stephen, so Stephen can ask for a trusted Naval officer; and Stephen, although he's had people of his own before, is utterly alone at the start of Master and Commander, and seems shocked and delighted when the Sophie's people cheer him on at the start of his commission. But barring a handful of loyal friends on the fence, the officers on the ship among whom Stephen should be able to count himself will always side with Jack in a conflict (Post Captain), and Stephen "I always side with the mutineers" Maturin absolutely refuses any additional officer privileges that might further distance himself from the hands. Recall that the Polychrests were absolutely sure he would side with them over Jack.
So Stephen has to reckon with the fact that his association with authority (authority that he seems to regard as inherently a slippery slope to tyranny -- his close, almost paranoid observation of Jack's temperament is at least partly in line with this, I believe) is inherent to his friendship with the ship's officers and the company on board the sloop/ship/frigate, but it's also these officers' adherence to rank in the Navy that prevent him from being able to be open and at ease with Jack except when they're alone. And Jack has to more or less surrender Stephen to the gunroom while they're at sea, and refrain from engaging with that group of officers at sport or jest or conversation except in directly proscribed ways, because he can't break the authority of his captaincy. And Stephen accepts a lot of things as "Navy matters he can't speak on," but he also comes into pretty consistent conflict with Jack and the other officers over practices he sees as cruel or inhumane, and at least once tries to bail because of them.
And they do bend these rules; everyone knows that Stephen and Jack are permitted allowances with each other that are off-limits to others, first because Stephen is a guest, then because he's new to the service, and then again because he and Jack have been friends for so long. But that doesn't mean that it's anything but a close and careful bending of the rules, which has to be made with close attention to what traditional etiquette, rank, and command demand.
All this to say that sending Stephen to Captain Clonfert and then confining him on the ship, forcing him into close association with a man neither he nor Stephen can stop comparing to Jack, and giving him the time to sit and talk and examine a command in which everyone's voice is heard, talk flows freely and great respect and affection are the order of the day, all comments are considered and weighed against the general good, personal liberty is paramount, and Clonfert reveals himself as a kind, hopeful, clever, engaging, politically agreeable, completely ineffectual captain...well. The Néréide starts to look less and less like a battered ship-of-the-line and more and more, to borrow a phrase, like the Stephen Maturin psychological warfare chamber.