It's just one of those things they didn't take into account. It doesn't make much sense to have floating rocks in the first place, but honest to say, there really isn't too much of a reason for it. Gravity seems to affect mainly the pokemon, not the environment leading me to think it's a move used directly on the user and the opponent, unlike moves like trick room, which envelop the entire field, despite gravity's description. Not everything in the game makes sense.
-Soundproof should block out thunder since thunder is the sound made by lightning.
-Whirlwind is commonly used after entry hazards are laid to try and spread damage/poison right? Wouldn't you think the whirlwind would blow the spikes/rocks away?
If it did work, I'm sure places like smogon would ban the use of Gravity. After all, we wouldn't want to get rid of our precious rocks. Maybe they'll change it to stop stealth rock in the future, but that's just the way things are.