I'm not sure if they're all like this, but my u-lock is a bit loose between the two pieces, the U and the bar. The provided mount snaps very very tightly onto the U, leaving the bar to fend for itself, so when I ride, any little bump makes the lock rattle. I believe the main source of the noise is the loose (non-locking) interface between U and bar; it's metal-on-metal there.
It's pretty obnoxious (and I feel like anyone I pass by must think my bike is broken), so if I have a bag I toss the lock in there instead. Sometimes that's not an option though, so I'd really love to stop the rattle while it's in the mount.
I believe it's one of these:
I expect that the little rubber rings are supposed to push up against the bar, and keep things held in place, but mine is loose enough that the right side wiggles around plenty.