These permutations are called $312$ avoiding permutations or stack-realizable permutations, because they can be sorted by the following recursively defined procedure $S$. Let $w$ be the permutation(string) we want to sort in increasing order as $123\dots n$. Let $w=u1v$ where $u,v$ are strings. Then $S(w)=1S(u)S(v)$. The number of those permutations with $n$ elements is the Catalan number $\frac{1}{n+1}\binom{2n}{n}$. Indeed, if $w=u1v$ is a permutation like that then any number in $u$ is less than any number in $v$ (because $w$ is $312$ avoiding permutation). It means that all those permutations can be constructed recursively by putting $1$ into some position, say $j$-th and then constructing all $312$-free permutations with the numbers $2,3,\dots,j$ on the left side and with the numbers $j+1,j+2,n$ on the right side. It means, denoting by $g(n)$ the number of all $312$ free permutations of $1,2,\dots,n$, it holds
$$g(n)=\sum_{j=0}^{n-1} g(j)g(n-1-j)$$and, as it is well known, this recurrence formula characterizes the Catalan numbers.