Since an offset by a constant (on each interval) is still a valid antiderivative. The real test is to differentiate the antiderivative and see if you get back the integrand, which it does here. So strictly speaking Mathematica's result is not wrong.
f[t_, a_, b_] := Piecewise[{{a t, t < 1}, {a, t < 1 + b}, {a (2 + b - t), t < 2 + b}}]
Plot[f[t, 1, 1], {t, -3, 3}]

sol2 = Integrate[f[t, a, b], t] /. {a -> 1, b -> 1};
integrand = D[sol2, t];
Plot[integrand, {t, -3, 3}, PlotStyle -> Red]

Which is the same as the original integrand. So I think there is no bug here. I also do not know how to make Mathematica gives continuous anti-derivative for a continuous integrand. I would be better if this was the case as with Maple's result below. But this is something internal to how Integrate works inside the kernel.
Below is Maple result.
restart;
f:=(t,a,b)-> piecewise(t<1,a*t,t<(1+b),a,t<(2+b),a*(2+b-t));
sol:=int(f(t,a,b),t):
sol:=subs([a=1,b=1],sol):
p1:=plot(sol,t=-3..3)
p2:=plot(int(f(t,1,1),t),t=-3..3)
Both give same graph

This is what Maple gives for int(f(t,a,b),t)
$$
\cases{\cases{1/2\,a{t}^{2}&$t\leq 1$\cr at-a/2&$t\leq 1+b$\cr a \left( 2\,t+bt-1/2\,{t}^{2} \right) +ab+a/2-1/2\,a \left( {b}^{2}+4\,b+3 \right) &$t\leq 2+b$\cr a \left( 1+b \right) &$2+b<t$\cr}&$0<b$\cr \cases{\cases{1/2\,a{t}^{2}&$t\leq 1$\cr a \left( 2\,t+bt-1/2\,{t}^{2} \right) -ab-a&$t\leq 2+b$\cr 1/2\,a \left( {b}^{2}+2\,b+2 \right) &$2+b<t$\cr}&$0<1+b$\cr \cases{1/2\,a{t}^{2}&$t\leq 1$\cr a/2&$1<t$\cr}&otherwise\cr}&otherwise\cr}
$$
Which when replacing a->1,b->1
becomes
$$
\cases{1/2\,{t}^{2}&$t\leq 1$\cr t-1/2&$t\leq 2$\cr 3\,t-1/2\,{t}^{2}-5/2&$t\leq 3$\cr 2&$3<t$\cr}
$$
Compare to what Mathematica gives
$$
\begin{cases}
\frac{a t^2}{2} & t\leq 1 \\
a t & b-t\geq -1 \\
a \left(b t-\frac{t^2}{2}+2 t\right) & b-t\geq -2
\end{cases}
$$
Which when replacing a->1,b->1
becomes
$$
\begin{cases}
\frac{t^2}{2} & t\leq 1 \\
t & 1-t\geq -1 \\
3 t-\frac{t^2}{2} & 1-t\geq -2
\end{cases}
$$
This is plot of both solutions, one is continuous, and the other is not.
sol1 = Integrate[f[t, 1, 1], t]
sol2 = Integrate[f[t, a, b], t] /. {a -> 1, b -> 1};
Plot[{sol1, sol2}, {t, -3, 3}]
