EDIT
In physics, most of us learned that \begin{align} \int_{a^-}^{a^+} f(x)\delta (x-a)dx&=f(a)\\ \frac{dH(x)}{dx}&=\delta(x). \end{align}
So, would it be natural to have the below? \begin{align} \int_0^t\delta(x+a)dx=H(t+a)-H(a) \end{align} However, it shows in Wolfram this weird complexity \begin{align} \int_0^t\delta(x+a)dx=(2H(t)-1)H(-a-tH(-t))H(a+tH(t)) \end{align}
It surprised me that my understanding of Heaviside function $H(x)$ was heavily overestimated.
No worry. It is a different expression for the same final result.
I have programmed your "weird function" defined by :
$$W(t)=\underbrace{(2H(t)-1)}_{sign(t)}.H(-a-t.H(-t))H(a+\underbrace{t.H(t)}_{ramp}) \tag{1}$$
(Matlab code below)
It gives the same result as $H(t+a)-H(a)$ in the two different cases $a>0$ and $a \le 0$.
It is not the first time that I see equivalent expressions written very differently using Heaviside function.
A known example is the "characteristic function" of interval $[a,b]$ (value $1$ for $a<t<b$, $0$ elsewhere) which can be written using $H$ function in (at least) two ways :
$$\underbrace{H(t-a)-H(t-b)}_{additive \ way}=\underbrace{H(t-a)H(b-t)}_{multiplicative \ way}$$
Please note that the first factor in (1) is the sign function and that $t*H(t)$ defines the "ramp function" which is a primitive function of $H$.