You're on the right track. The issue is that the sign of the argument $b/a$ to $\arctan$, is positive if $a$ and $b$ share the same sign, and negative if $a$ and $b$ have opposite signs, so you cannot distinguish which quadrant $\alpha$ lies in by simply knowing $b/a$: you also need to know another piece of information, such as the sign of $a$ itself.
To illustrate, suppose we have $$f(a,b,\theta) = a \cos \theta + b \sin \theta$$ and consider $f(1, \sqrt{3},\theta)$. Then we have $\alpha = \arctan \sqrt{3}$, but there are two angles that satisfy this relationship, namely $\alpha \in \{\frac{\pi}{3}, -\frac{2\pi}{3}\}$. Which one do you choose? By the sine angle addition identity, you showed that $f$ must take on the form $\sqrt{a^2 + b^2} \sin (\theta + \alpha) = 2 \sin (\theta + \alpha)$. If $\theta = 0$, then $f(1, \sqrt{3}, 0) = 1$, so we need $2 \sin \alpha = 1$. Of the two choices, only $\alpha = \pi/3$ makes this true; the other choice gives $-1$. So we must have $f(1, \sqrt{3}, \theta) = 2 \sin (\theta + \frac{\pi}{3})$.
Similarly, $f(-1, -\sqrt{3}, \theta)$ has $b/a = \sqrt{3}$, and should yield $-2 (\sin \theta + \frac{\pi}{3})$, yet without knowing the sign of $a$, you would not get the negative sign in front. Alternatively, you could choose $\alpha = -2\pi/3$ and write $$f(-1, -\sqrt{3}, \theta) = 2 \sin (\theta - \tfrac{2\pi}{3})$$ which is also correct, but this is because we chose the angle according to the quadrant in which the point $(a,b)$ lies.
So you have a choice here: you can either observe the quadrant of $(a,b)$ and choose $\alpha$ to match it, or you can make $\arctan$ a one-to-one function with range in $(-\pi, \pi]$ and then choose the appropriate sign according to the sign of $a$. This second approach is the reason for $|a|/a$ and is the approach taken by the solution you quoted.
Here is another example: $$f(-2,2,\theta) = 2\sqrt{2} \sin (\theta + 3\pi/4),$$ if we pay attention to the quadrant in which $(2,-2)$ lies (second quadrant). Or we can write it as $$f(2,-2,\theta) = -2\sqrt{2} \sin (\theta - \pi/4),$$ if we evaluate $\alpha = \arctan (-2/2) = \arctan (-1) = -\pi/4$, always taking the angle to be between $-\pi$ and $\pi$.