In my example, the "captain" in question wore 4 stripes, and in his little chat, he explained that actually he was "acting first officer" as he had been called in to cover sickness, so essentially there were two expereinced captains on the flight deck. (Though that was probably to calm the nervous passenger).
Just struck me as a really nice gesture, to just come and stand for a few minutes, share some banter with the passengers and his crew in the front galley.
RTG!