To be honest, it has been a while but I did try it for developing code. The main issue is that (not bragging) I was working with an older, more "senior" developer but I was a much stronger developer. When he was driving, he wouldn't really have a plan for what to work on next. Maybe it was someone looking over his shoulder, I'm not sure. He also had trouble following when I was driving even though I spent extra energy trying to explain what I was doing. As has been discussed, it takes a lot of discipline and matched skill levels and approaches to be successful (imo) and I think that is the exception not the rule. ymmv, so to each their own.
ymmv for sure. i suspect that pairing is far less valuable if not used in tandem with other XP techniques (eg tdd, ci/cd, continuous process). but certainly pairing isn't the One True Agile Way ;)