Let's analyze when this exchange of sum and limit is allowed. It can be written as $$ \lim_{n\rightarrow\infty} \sum_{i=1}^n a_{i,n} = \lim_{m\rightarrow\infty} \sum_{i=1}^m \lim_{n\rightarrow\infty} a_{i,n}$$
We can freely add $\lim_{m\rightarrow\infty}$ in the first term and in the second term we can put $\sum_{i=1}^m$ under $\lim_{n\rightarrow\infty}$, to get the condition
$$ \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=1}^n a_{i,n} = \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=1}^m a_{i,n} $$
assuming these limits are finite, we can write this condition as
$$ \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \big(\sum_{i=1}^n a_{i,n} - \sum_{i=1}^m a_{i,n}\big) = 0 $$
$$ \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=m+1}^n a_{i,n} = 0$$
As you've noticed, it's not always satisfied; for $a_{i,n} =\frac1 n$ we have $$ \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=m+1}^n \frac{1}{n} = \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \frac{n-m}{n} = \lim_{m\rightarrow\infty} 1 = 1 \neq 0$$
However, if, for example, we can find a bound $|a_{i,n}| \le M_i$ such that $\sum_{i=1}^\infty M_i $ is a convergent series, then this condition is satisfied, because $$ 0 \le \left| \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=m+1}^n a_{i,n}\right| \le \lim_{m\rightarrow\infty} \lim_{n\rightarrow\infty} \sum_{i=m+1}^n M_i = \lim_{m\rightarrow\infty} \sum_{i=m+1}^\infty M_i = 0$$
In the problem from the video this condition is satisfied, because $$ a_{i,n} =(1-\frac{i}{ n})^n \le e^{-i} =: M_i$$
In conclusion a criterion that allows to get with the limit under the sum in this case is
If there exists a sequence $M_i$ such that for every $n\in\mathbb N$ we have $|a_{i,n}| \le M_i$ and $\sum_{i=1}^\infty M_i$ is convergent, then $$ \lim_{n\rightarrow\infty} \sum_{i=1}^n a_{i,n} = \sum_{i=1}^\infty \lim_{n\rightarrow\infty} a_{i,n}$$
I believe this to be a special case of Weierstrass M-test. $a_{i,n}=\frac1 n$ obviously doesn't satisfy this criterion. There may exist weaker criteria, but this one is sufficient.