On my current bike (Guerrilla Gravity), I had it mounted to the attachment points on the bottom of the top tube. I'm assuming that the bottle's attachment to it's magnetic mount strip was flexy enough that the bottle was bouncing off the topside of the downtube. But it could be vertical play within the magnetic catch.
On the previous setup ('19 Sentinel), I have no idea why it rattled. My guess is the whole system was flexing or moving slightly.
My bikes are generally pretty quiet, and I'm aware of certain noises they do make, so when I change something and there's more noise, it drives me nuts.