Camera - set background image - python
You have to assign your image to bg.image. The last line should therefore be:

bg.image = img


Below you find a modified version of your code that runs properly.

import bpy

cam = bpy.context.scene.camera
filepath = "D:/path/to/image_seq.jpg"

img = bpy.data.images.load(filepath)
cam.data.show_background_images = True
bg = cam.data.background_images.new()
bg.image = img


If you want to use an image sequence you will have to set the img.source:

img.source = 'SEQUENCE'


Make sure that your filenames of the sequence are numbered, so that Blender can automatically identify the consecutive frames.