Why are all planets made of rock?
They aren't. Jupiter and Saturn are gas giants, and whilst no-one's 100% sure what's at the centre, it seems likely that it's super-condensed liquid still.
Even then it depends on what you mean by 'rock' - The Earth has a solid crust, but the inner is molten, and whilst it's molten rock for most of the way, there's reasonably strong evidence that the core is metallic (iron in the centre, and then an outer layer of iron-nickel).
O.