In RSA. Why is $\phi(n)$ kept secret and $n$ is public? I mean, $n$ can also be easily used to find the factors $p$ and $q$ right?
No, it is not easy! RSA is based on the difficulty of factoring the product $n=pq$ of two large prime numbers. But if you know $\varphi(n)$ for plain RSA you can compute the secret exponent $d=e^{-1}\bmod \varphi(n);\;$ and you can factor $n$ from the two equations $n=pq,\;\varphi(n)=(p-1)(q-1)$.