Cameras and phones with cameras are all prone to a rattling sound. The focus mechanism has moving parts that are moved by a very small, very weak motor. If they are too tight the motor can't move them. They are kinda floating inside the lense. This is one of the oldest and most consistent...