The "delta functions" that Griffiths is talking about arise from the discontinuity of $\psi'(x)$. This does not necessarily mean that the definition of $\psi'(x)$ actually has Heaviside step functions in it (though you can think of it as such.)
If we take the derivative of $\psi$ we get
\begin{align}
\psi'(x) = \begin{cases}
- \frac{\pi A}{a} \sin ( \pi x / a ) & -a/2<x<a/2\\
0 & \text{otherwise}
\end{cases}.
\end{align}
This is discontinuous at $x = \pm a/2$; in particular, we have
$$
\lim_{\epsilon \to 0} \left[ \psi'(a/2 + \epsilon) - \psi'(a/2 - \epsilon) \right] = \frac{\pi A}{2}.
$$
But we also have
$$
\lim_{\epsilon \to 0} \left[ \psi'(a/2 + \epsilon) - \psi'(a/2 - \epsilon) \right] = \lim_{\epsilon \to 0} \left[ \int_{a/2 - \epsilon}^{a/2 + \epsilon} \psi''(x) \, dx \right]
$$
and since this integral does not vanish in the limit as $\epsilon \to 0$, it must be the case the $\psi''(r)$ (defined as a distribution) includes a delta-function at $x = a/2$. Similar logic applies to the point $x = - a/2$.
That said, if you really insist on the idea that $\psi'(x)$ must have step functions in it, you can take the approach suggested in the comments and rewrite it as
$$
\psi'(x) = - \frac{\pi A}{a} \sin \left( \frac{\pi x}{a} \right) \left[ \Theta\left( x + \frac{a}{2} \right) - \Theta \left( x - \frac{a}{2} \right) \right].
$$
But this sort of rewriting rapidly becomes cumbersome for more complicated functions. In contrast, the "integral proof" above can be extended straightforwardly to show that any discontinuity in $f^{(n)}(x)$ implies that $f^{(n+1)}(x)$ has a delta function in its distributional derivative.