Using
IB0(t) = vpaintegral(@(tau)B(tau,0),tau,0,t,'Waypoints',[1]);
instead of
IB0(t) = int(B(tau,0),tau,0,t);
makes the wiggles disappear.
The reason for the wiggles is that your function B is discontinuous at tau = 1. Using the points of discontinuity as fixed grid points (Waypoints) in the integration gives exact results.