From 22 to 18 is covered in many books, including quite a bit in my Routing the Golf Course title. I always found Bill Yates's explanation (theory) very interesting, here is the passage:
Pace-of-play expert Bill Yates, who has studied The Old Course in an effort to keep play moving in the 2000s, theorizes that the change very well could have had something to do with congestion on the links, even way back then. “If I analyze the course as it might have been with extra holes in those parts of the round, the waiting times might have driven the members a bit nutty,” he notes. Decongestion is as good of theory as any. And why not? Golf is an experience to be enjoyed. Imagine four short holes to begin a round, about 200 yards each. While it might not have been so bad with the limited length of the balls of the time, this configuration still could have caused players to wait, as short holes seem to beg congestion, especially when bunched together. It may also have provided another distraction in that the closing holes, as the holes were played in reverse on the way in, were of the same short length. Hardly the type of finish one would want on a challenging test. Taking the rough dimension of 800 yards (the approximate total of the original first four holes) and removing two holes raises the yardage of these three opening holes — and three finishing holes — to around 400 yards each. Each of these holes — the first two and the last two — are today all par 4s, and, yes, their yardages are, in fact, just under or slightly over 400 yards apiece. This configuration sounds infinitely better than what we envision to have been there prior to 1764. Even with the first stroke play being mentioned in 1759, match play would have been undoubtedly better suited to this design as well.