To see how this works in a general context, observe that the first order differential equation is separable and is of the form
$$ \frac{dx}{dt}=F(t)G(x). $$
To solve this equation we can divide by $G(x(t))$ to get
$$\frac{1}{G(x(t))}\frac{dx}{dt}=F(t).\tag{1}$$
Then we can find a function $H(x)$ whose derivative with respect to $x$ is
$$H'(x)=\frac{1}{G(x)}\quad\left(\text{solution: $H(x)=\int \frac{dx}{G(x)}$}\right).\tag{2}$$
The chain rule then implies that the left hand side in $(1)$ can be written as
$$\frac{1}{G(x(t))}\frac{dx}{dt}=H'(x(t))\frac{dx}{dt}=\frac{dH(x(t))}{dt}.$$
Therefore $(1)$ is equivalent to
$$\frac{dH(x(t))}{dt}=F(t).$$
In your example
$$F(t)=a,\quad G(x)=x.$$
Therefore
$$H'(x)=\frac{1}{x},\quad a=F(t)=\frac{d}{dt}\left(H(x(t))\right)=\frac{d}{dt}\left(\ln(x(t))\right)=\frac{1}{x}\frac{dx}{dt},$$
which implies
$$\frac{dx}{x}=a\,dt.$$
It is more intuitive to observe that the first order differential equation
$$\frac{dx}{dt}=ax\tag{3}$$
is separable. Thus, it can be rewritten as
$$\frac{dx}{x}=a\,dt.\tag{4}$$