This is known as the formal criterion for "formal smoothness." In this stacks project entry they prove that a morphism of schemes (in your case $\text{Spec }A \to \text{Spec }k$) is smooth if and only if it's formally smooth and locally finite presentation.
Aside from philosophical importance, it's often easier/more intuitive to check this formal criterion than to check the dimension of $\Omega_{\text{Spec }A/\text{Spec }k}$ or use a Jacobian. In the same stacks project tag, they say:
Michael Artin's position on differential criteria of smoothness (e.g., Morphisms, Lemma 01V9) is that they are basically useless (in practice).
Let's suppose $\text{Spec }A$ were instead a moduli space $\overline{M}$, e.g. of curves. Then to check $\overline{M}$ is smooth (if we know finite presentation), we need only consider an infinitesimal extension $S \subseteq S'$ coming from $B' \to B$ as in your question, and try to extend a curve over $S$ to a curve over $S'$.
If you want to build the cotangent complex of $X = \text{Spec } A$ (or equivalently the "normal sheaf") but $A$ is not smooth, the first step is to replace $A$ by a smooth $k$-algebra mapping to it, say $k[A]$. Even if some $A \to B$ doesn't factor through $B'$, $k[A] \to A \to B$ certainly will (by choosing a set-theoretic preimage in $B'$ of the image of $A$ in $B$) and so the "problem" obstructing a factorization of $A \to B$ can be traced to the kernel of $k[A] \to A$. I highly recommend this stacks project article that carries this out as concretely as possible.
You can get specific cohomological obstructions to such a factorization by continuing with a simplicial resolution: $\cdots k[k[A]] \rightrightarrows k[A] \to A$. One can even think of this as "covering $A$ by smooth algebras" in a topological sense using this Jonathan Wise article.
EDIT: I can be a bit more precise about the connection to ordinary differentials. Suppose $f : A \to B$ is fixed and we're trying to find a map $\widetilde{f} : A \to B'$ such that $A \overset{\widetilde{f}}{\to} B' \to B$ is $f$. First, pullback along $f$ to get another squarezero extension $$0 \to I \to B' \times_B A \to A \to 0.$$ Our old search for $\widetilde{f}$ translates to finding a section of the map $B' \times_B A \to A$. We've reduced to the case $f = id_B : A = B$.
Given one section $s$ of $B' \to B$, this splits the underlying sequence of modules and lets us write $B' =_{modules} B \oplus I$. But what's the ring structure? One computes $(b, i)*(b', i') = (bb', bi' + b'i)$, i.e. $B' = B + I\epsilon$ is the trivial squarezero extension!
If I have two sections $s, t$ of $B' \to B$, they'll give very different isomorphisms $B' \simeq B + I \epsilon$, inducing an automorphism $\varphi$ of $B + I \epsilon$ over $B$. Such automorphisms are precisely derivations! Indeed $\varphi$ must be the identity on $B$ and send $I$ to itself, but $\varphi - id_{B'}$ will be a map from $B \to I$ (using co/kernel univ props on the short exact sequence) which you can check is a derivation.
If sections exist, they all differ by a unique derivation $s-t$. A fancy way to say this is that "sections form a pseudo-torsor under $\text{Der}(B, I)$." If sections really do (locally) exist, you call it a plain torsor.