The way animation with key frames works is that only specified data values (e.g., location and rotation) AT the key frames are remembered, not how they got there.
If you focus on just one of your spheres -- say the one at the top left -- at the first key frame, it's in the top left position with a particular orientation. At the second key frame, it's in ...
Preferences > Keymap > Animation > Change Frame
Default value: shift right mouse
Change to: Left mouse
Note: No need to disable the "box selection" behavior. This overrides that. The above change is all you need to do.
Well, I still can't find a way to change an object, but I did find out how to delete the current object and create a slightly altered object for every frame.
The key is to use bpy.app.handlers:
import bpy, math
#remove all default objects
bpy.data.objects['Cube'].select = True
bpy.data.objects['Camera'].select = True
bpy.data.objects['Lamp'].select = ...