Finding $L(n)$ is one way to factor the number $n$. There might be other ways.
However, in the natural numbers there is essentially no other way, but this is a feature of the natural numbers and this must be proved! You'll see that induction has a fundamental role in the argument, but also Euclid's theorem: “if $p$ is prime and $p\mid(ab)$, then $p\mid a$ or $p\mid b$”.
The base case is easy: $n=2$ is a prime number, so its factorization is obviously unique. Suppose that unique factorization holds for every number $m$ with $2\le m<n$. If $n$ is prime, there's nothing to prove. Otherwise take a factorization of $n$ as a product of primes in nondecreasing order as provided by choosing each time the minimal divisor greater than $1$:
$$
n=p_1p_2\dots p_k,\qquad p_1\le p_2\le\dots p_r
$$
Thus $p_1=L(n)$ by construction. Take another similar factorization
$$
n=q_1q_2\dots q_s,\qquad q_1\le q_2\le\dots q_s
$$
We have $q_1\ge L(n)=p_1$, because $L(n)$ is minimum among the divisors of $n$ greater than $1$. On the other hand, $p_1$ is prime and so it divides one of the $q_i$, but then $p_1=q_i$ for some $i$. Thus $q_1\le q_i=p_1$ and therefore $q_1=p_1$.
Hence we can consider $m=n/p_1=p_2p_3\dots p_k$ and factorization is unique by the induction hypothesis. Therefore also the factorization of $n$ is unique (complete the details).
If we want a more general framework, namely integral domains, we have to waive full uniqueness in favor of “uniqueness up to multiplication by invertible elements”. Over the integers, we can take $n\in\mathbb{Z}$ with $|n|>1$ and consider a noninvertible divisor $p$ such that $|p|$ is minimal. The arguments above carry over easily.
But they don't in different cases: take $R=\mathbb{Z}[\sqrt{-5}]$. We can define, for $z=a+b\sqrt{-5}$, the norm to be $N(z)=a^2+5b^2$ and choose, among the noninvertible divisors one of minimal norm. It's easy to prove that such a divisor cannot be expressed as a product of two noninvertible elements (or its norm wouldn't be minimal). But Euclid's theorem doesn't hold in this case. Indeed we can write
$$
6=(1+\sqrt{-5})(1-\sqrt{-5})=(2+0\sqrt{-5})(3+0\sqrt{-5})
$$
The norm of $2=2+0\sqrt{-5}$ is minimal, but $2$ divides neither $1+\sqrt{-5}$ nor its conjugate $1-\sqrt{-5}$. And the argument above fails here.