No. Even if $f$ is irreducible, your statement still is not true in general, it's only guaranteed that every automorphism of $K$ fixing $L$ gives rise to a map taking $a_i$ to $a_j$, given $a_i$ and $a_j$ are two roots of $f$. To make it clear, let's take the splitting field $K$ of $f(x)=x^3-2$ over $\mathbb{Q}$ and an example. $f(x)$ is clearly irreducible due to Eisenstein's criterion. $K$ is not just $\mathbb{Q}(\sqrt[3]{2})$ since the three roots of $f(x)$ are $\sqrt[3]{2}$, $\sqrt[3]{2}(\frac{-1+i\sqrt{3}}{2})$, $\sqrt[3]{2}(\frac{-1-i\sqrt{3}}{2})$, and the two latter roots are not elements of $\mathbb{Q}(\sqrt[3]{2})$. Hence, It's obvious that $K=\mathbb{Q}(\sqrt[3]{2}, i\sqrt{3})$. The degree of this extension is 6 (why?), so $|Gal(K/\mathbb{Q})| = 6$. Denote $\rho = \frac{-1+i\sqrt{3}}{2}$, then $K$ can be written $\mathbb{Q}(\sqrt[3]{2}, \rho\sqrt[3]{2})$. From this we can see that any automorphism maps each of these two elements to one of the roots of $f(x)$, which gives 9 posibilities, but since the Galois group has order 6 so not every map gives a rise to an automorphism of the field (of course, such automorphism must fix base field which is $\mathbb{Q}$). The reson for that is that there maybe algebraic relations among the generators and an automorphism must be respected these relations. For example, consider the automorphism which is constructed by 2 maps $\sqrt[3]{2} \to \rho\sqrt[3]{2}$ and $\rho \sqrt[3]{2} \to \rho\sqrt[3]{2}$. The quotient of the generators here is $\rho$, which is mapped to 1, which gives a contradiction since this automorphism is not injective (it maps 1 and $\rho$ to 1). Hence these 2 maps can not be formed as an automorphism.
Hope this helps!