I think that before we can answer the question about why the Trolls' clothes turned invisible, we should probably wonder why the Trolls' themselves turn invisible. This is not an advantageous physical peculiarity we're dealing with. Darwin would be scratching his head wondering how they lasted so long as a species.
As for Frodo and the Ring, I started a topic on that very question a while ago. Along the lines of;
"Why did Frodo's clothes turn invisible? Because he was touching them? Then why didn't the ground he was walking on turn invisible?" (a logical conclusion to draw from that!

)
Don't mock me, please. Replies centred around the fact that the One Ring was not some "cheap magic trick" and that it specifically targeted the hobbit Frodo for invisibility.
Just to clear that Frodo question up. Now, speak of Trolls.