If you let $r_i$ be the remainder when $a_i$ is divided by $1001$, you get an infinite sequence of remainders, $\langle r_1,r_2,r_3\dots\rangle$. Consider the first $1002$ of these remainders: each one of them has to be one of the integers $0,1,2,\dots,1000$, and there are only $1001$ of these possible values. Thus, some two of the first $1002$ remainders must be equal. Let’s call them $r_i$ and $r_j$, where $1 \le i < j \le 1002$.
Let $q_i$ be the quotient when $a_i$ is divided by $1001$; then $a_i = 1001q_i + r_i$. Similarly, if $q_j$ is the quotient when $a_j$ is divided by $1001$, then $a_j = 1001q_j + r_j$. It follows that $\begin{align*} a_j - a_i &= (1001q_j+r_j) - (1001q_i+r_i)\\ &= 1001(q_j-q_i)+(r_j-r_i)\\ &= 1001(q_j-q_i), \end{align*}$
where the last step is justified because $r_j=r_i$. This shows that $a_j-a_i$ is a multiple of $1001$.
Now $a_j$ is a string of $j$ $3$’s, and $a_i$ is a string of $i$ $3$’s, so $a_j-a_i$ is a string of $j-i$ $3$’s followed by $i$ $0$’s. (If you’re not sure about this, look at some examples!) And $a_{j-i}$ is a string of $j-i$ $3$’s, so $a_j-a_i$ is $a_{j-i}$ followed by $i$ $0$’s. Each of those $i$ $0$’s represents one multiplication by $10$, so $a_j-a_i = a_{j-i}10^i$. Thus, $a_{j-i}10^i$ is a multiple of $1001$, or, more concisely, $1001\mid a_{j-i}10^i$.
Finally, you have a theorem that says that if $a\mid bc$, and $a$ and $b$ are relatively prime, then $a\mid c$. $1001$ and $10^i$ are relatively prime, so that theorem tells us that $1001 \mid a_{j-i}$, i.e., that $a_{j-i}$ is a multiple of $1001$.