Why is There Gravity?

Gravity exists here on planet earth to keep things from floating. If there was no gravity, everything would float! That means the tables we eat at to the beds we sleep on would be floating while moving at somewhat its own pace!