Here's why:
* Buoyant force is the upward force exerted by a fluid (liquid or gas) that opposes the weight of an object immersed in it.
* Gravity is the force that pulls objects towards the center of the Earth.
When these forces are equal:
* The upward buoyant force perfectly balances the downward force of gravity.
* There is no net force acting on the object.
* The object will remain at rest, neither sinking nor rising. This is the definition of floating.
Example: A boat floats because the buoyant force acting on it is equal to its weight.