The camera shake you describe is due to the exposure time/light level. The fireworks have a shorter time in the exposure than the trees (say 1 second burst) but are brighter so they show up more.
The rest of the shot inc trees had a longer exposure (maybe 3-4 seconds) but are a lot dimmer, making them more susceptable to camera shake.