By personal subjective experience, the usecase where pair programming shines most is onboarding and skill transfer. Basically, you have a person who needs to learn a skill and a person who has the skill, so you sit the person who has the skill next to the other person and get the other person to do a task that needs the skill by instruction of the person who has the skill. This is way more efficient than lectures and slightly more efficient than reading documentation, because all parts of the skill are taught, only relevant information is taught, and the instruction is necessarily in actionable form. Important conditions are that the learning person is open to instruction and correction, and the teaching person avoids meandering into irrelevant information. Pair programming done like this relies on both parties being effective communicators.
(A related technique is mob programming, which is useful for collaborative design assuming your code environment is highlevel enough to keep pace with the discussion.)
By personal subjective experience, the usecase where pair programming shines most is onboarding and skill transfer. Basically, you have a person who needs to learn a skill and a person who has the skill, so you sit the person who has the skill next to the other person and get the other person to do a task that needs the skill by instruction of the person who has the skill. This is way more efficient than lectures and slightly more efficient than reading documentation, because all parts of the skill are taught, only relevant information is taught, and the instruction is necessarily in actionable form. Important conditions are that the learning person is open to instruction and correction, and the teaching person avoids meandering into irrelevant information. Pair programming done like this relies on both parties being effective communicators.
(A related technique is mob programming, which is useful for collaborative design assuming your code environment is highlevel enough to keep pace with the discussion.)