Hi, I think you’ll find it’s just the long standing difference between the way the viewport handles alpha, and the way the compositor handles it. Try adding a square in your scene over a transparent background area, and add a material that’s half diffuse and half transparent. It comes out darker on the viewport with a background image than when it’s composited with an alphaover node. Pure emission is even more different, with it being shown over the background image in the viewport, but having no alpha in the compositor.
The viewport is just a quick approximation. It’s been reported as a bug a number of times, but apparently the behaviour is deeply burried in the viewport. Likely fixed in 2.8 though.
I’d suggest you render the shadow catcher in a different render layer, and composite this between the background image and the foreground image. It only need a small number of samples as you can generally blur it. That way you can quickly adjust the shadow intensity and colour balance to match other shadows in the image. This is very had to do in the viewport because any changes affect both the model and the shadow.