Because George Washington ran twice and then retired. This was hailed as an immensely humble and self-sacrificial act, since he could have gotten reelected indefinitely due to getting most of the credit for winning the war, but he didn't want to run for the second term in the first place. He only did it at all because the vast majority of his advisers told him that he was still needed in office, for national unity. Washington was certainly a more unifying figure than Jefferson or Adams, who ran against each other in 1796, so that's pretty plausible.
Washington served two terms, and in those days people were awfully eager to follow his example, so from then on the tradition was not to run for a third term. Jefferson left the White House after two, as did Madison, Monroe, and Jackson. After Jackson left, several men in a row went for only one term, though that tended to be more a matter of an inability to be renominated and increasing strain of keeping the nation together.
Ulysses S. Grant was the first to buck the trend; he initially succeeded Andrew Johnson from 1869 to 1877, and then duly left office and spent three years traveling the world. On his return, many colleagues urged him to run again, and he got pretty close to the nomination at the convention, but never managed more than 312 votes, 67 short of what he needed. James Garfield was chosen instead, and shot a year later; the bullet didn't kill him, but massive infections from several doctors poking around with filthy hands finished the job. (Not joking about any part of that.)
Two terms were again the norm, until Roosevelt, having been in the White House from 1901 to 1909, got pissed at his protege Taft, and ran against him. Taft, as the incumbent, managed to have sufficient party loyalty at the convention to vote to accept pro-Taft delegations from the wavering Roosevelt states, and narrowly kept the Republican nomination, though when Roosevelt formed the Bull Moose party and stayed in the game, it was pretty clear that neither of them could win.
It was the other Roosevelt who finally outlined the need for change; granted, his situation was unusual, following the popularity of resolving the Great Depression with an antipathy for changing presidents in the middle of a huge war, but he established that third and even fourth terms were possible. Nobody wanted that to happen again, since that ran perilously close to an indefinite presidency. So they started drafting the 22nd amendment, barring anyone who had served more than a term and a half from running again; it didn't apply to Truman, who was halfway through his only rightful term when it was ratified in February 1951, but he lost the New Hampshire primary anyway, and pulled out of the race.
Section 1. No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once. But this article shall not apply to any person holding the office of President when this article was proposed by the Congress, and shall not prevent any person who may be holding the office of President, or acting as President, during the term within which this article becomes operative from holding the office of President or acting as President during the remainder of such term.
Section 2. This article shall be inoperative unless it shall have been ratified as an amendment to the Constitution by the legislatures of three-fourths of the several states within seven years from the date of its submission to the states by the Congress.