As $\pi$ has infinite digits in its decimal expansion, one could argue that its digits will repeat after a finite number of digits. If so, it is a rational number. What's wrong with this argument?
There's nothing wrong with the argument
If pi's digits repeat after some finite segment, then it is rational.
in the same way that there's nothing wrong with the argument
If 1+1 = 3, then 4 = 6.
But in both cases the left side is false so the implication is true only trivially. $\pi$ is known to be irrational (in fact, transcendental).
I am guessing that you are mixing up the fact that some digit will have to reappear infinitely many times in the expansion (since there are infinitely many decimal places to fill and only 10 choices for each) - this is correct - with the (incorrect) idea that this means the expansion will be repeating.
(Addendum: actually it occurs to me you may have been thinking about the idea that some block of digits will reappear infinitely often. This is also correct. In fact, for the same reason that at least one digit will appear infinitely often, there will be a block of digits of length $n$, for any $n$, that repeats infinitely many times. But as I hope the comments below show, this is still different from settling into a repeating pattern.)
Since the argument does not make use of any special features of $\pi$, to see what's going on we could consider any irrational number. Here is one manufactured to make it clear what's going on with the digits in the long run:
This number was designed so that I could make sure the decimal expansion is not eventually repeating. There is no segment of the decimals such that eventually the expansion consists of this segment over and over again, because the sequences of 1's and 0's get longer and longer.
Now, what I took you to be saying is that because there are infinitely many places in the expansion, some digits have to happen infinitely often. This is correct. (It's a consequence of the pigeonhole principle.) However, they don't happen in a repeating pattern. In the case at hand, the digits 0 and 1 both occur infinitely often, but not in a repeating way. Similarly, in $\pi$, some digit must occur infinitely often, but they never settle into a cycle that repeats itself.
$$ 3.1415926535\ldots $$ The digit $1$ "repeats" since it appears in the third place after the decimal point after appearing earlier in the first place after the decimal point; likewise $3$ repeats since it appears in the ninth place after the decimal point after appearing earlier before the decimal point, and $5$ similarly repeats.
The pigeonhole principle says that kind of "repetition" must happen no later than the 11th digit, since only $10$ digits can be distinct.
But that's not the sort of "repetition" from which one can infer that a number is rational. That involves periodicity.
Consider the Champernowne constant: $$ 0\ .\ 1\ 2\ 3\ 4\ 5\ 6\ 7\ 8\ 9\ 10\ 11\ 12\ 13\ \dots $$
It is made by counting out loud and writing down whatever number you are saying. (Notice I don't intend for the number "13" to occupy a single place value, but rather I write down a "1" and then a "3".)
This number has infinitely-many digits, since there are infinitely-many counting numbers. The number cannot be expressed as some finite string of digits repeating infinitely-often, since you won't find a repeat in the set of counting numbers.
I struggled with this theory until I read an article similar to the one listed below outlining the reality of infinity.
"Take, for instance, the so-called natural numbers: 1, 2, 3 and so on. These numbers are unbounded, and so the collection, or set, of all the natural numbers is infinite in size. But just how infinite is it? Cantor used an elegant argument to show that the naturals, although infinitely numerous, are actually less numerous than another common family of numbers, the "reals." (This set comprises all numbers that can be represented as a decimal, even if that decimal representation is infinite in length. Hence, 27 is a real number, as is π, or 3.14159….)
In fact, Cantor showed, there are more real numbers packed in between zero and one than there are numbers in the entire range of naturals. He did this by contradiction, logically: He assumes that these infinite sets are the same size, then follows a series of logical steps to find a flaw that undermines that assumption. He reasons that the naturals and this zero-to-one subset of the reals having equally many members implies that the two sets can be put into a one-to-one correspondence. That is, the two sets can be paired so that every element in each set has one—and only one—"partner" in the other set."