If $n=q_1 \dots q_k$, where $q_j$ are relatively prime, then computing $\mu(n)=\mu(q_1 \dots q_k)$ is equivalent to computing $\mu(q_1)\dots \mu(q_k)$. To know that $\mu(n)=\mu(q_1)\dots \mu(q_k)$, you have to know that $n=q_1 \dots q_k$ and that the $q_j$'s are pair-wise relatively prime. Recursively applying this argument to each $q_j$, we find that when $n$ is not divisible by a square, it is necessary to know that for some $m$, we have $n=p_1\dots p_m$, where each $p_j$ is prime. This is the same as computing the prime factorization of $n$. When $n$ is divisible by a square, then you don't have to compute the prime factorization of $n$.