The idea behind the encryption scheme is that even if someone had the encryption key, e, and the value of n, it is extremely difficult to get the value of the decryption key, d. To get d, you would need the value of f, which requires that you know the values of p and q. Knowing n, the only way to get the values of p and q is to determine the two prime factors of n. The larger n is, the harder this is to accomplish.
As noted in the lecture material, the computer algorithm for integer factoring has a run time that is exponentially related to the size of n. Thus, the larger n is, the harder it is for the computer to figure out the prime factors. In fact, each incremental increase in the size of n has a larger impact on the complexity of the problem than the preceding incremental increase. And the way to make n large is to make p and q large.
So, by making p and q large prime numbers, you make it so that even if your computer system was hacked and the encryption key was obtained, the attacker still wouldn't be able to determine the decryption key. The value n is usually made large enough so that 'every computer in the world, working simultaneously on the problem, would take more years than the Universe has been in existence', to come up with a solution. That might be a bit of hyperbole, but the general idea is that it would take a machine with significant computer power (i.e. a supercomputer) an exceedingly long time to solve the problem, to the point that by the time a solution was obtained, the value of the encrypted information would have long since become zero.