If $n=p_1 \dots p_k$, where $p_j$ are prime and distinct, then computing $\mu(n)=\mu(p_1 \dots p_k)$ is the same thing as computing $\mu(p_1)\dots \mu(p_k)$. To compute $\mu(p_1)\dots \mu(p_k)$, you have to know that each $p_j$ is prime. To know that $\mu(n)=\mu(p_1)\dots \mu(p_k)$, you have to know that $n=p_1 \dots p_k$ and that the $p_j$'s are pariwise relatively prime. Hence, you must compute the prime factorization of $n$ in order to compute $\mu(n)$, since you must know that $n=p_1 \dots p_k$, where $p_j$ are prime and distinct. When $n$ is divisible by a square number, obviously you don't have to know the prime factorization of $n$.