This allows Black to keep the queenside closed whichever pawn, a or b, White advances. This very much resembles the outcome of Petrosian's 1 8 . . . a6 ! in his 7th match game against Spassky in 1966. Now Black still has a long way to go on the kingside, but at least his king, unlike the white one, is out of the way, and he later managed to outwit his opponent.
Heading for an endgame can also be a valid reason for taking your king for a stroll. In the diagram position, the queens are very likely to disappear from the board, and because of that, Black would prefer to keep his king in the center, for instance on e7. Apparently, Anand was not satisfied with that and sent his king towards c7, where it also defends the pawn on b7.
It's not much of a pawn that White wins, considering his doubled c-pawns. Although he disposes of his bad bishop, it is Black who obtains the active pieces.
24...Kc6 25.Bxc6 Bxc6 26.Qxc5 dxc5 27.Rb2 Ra3 28.Nb1 Ra4 29.Nd2 Rd8 30.Re1 Rd6 31.g4 Be8
As you may know, the location of the king is crucial in positions with only major pieces. Having the initiative against a vulnerable king is a big advantage in such positions. No wonder here we see the occasional stroll to the opposite side. Here Black has the upper hand, but he still has to break through on the kingside. In order to do so, he first brings his own king to safety. This strongly resembles Petrosian-Unzicker, Hamburg 1 960, where the future World Champion, in a superior position, first brought his king from g1 to b1 before starting an offensive on the kingside.
Perhaps the more active 38.f4 was worth a try, while 38.a6 seems useful to include, to obtain some entry squares ( c6 at least) for the queen.