Final answer:
The water stays in the bucket due to the centripetal force being greater than or equal to the force of gravity at the top of the path, which prevents the water from spilling even during inversion.
Step-by-step explanation:
When a bucket of water is whirled in a vertical circle, and the water does not spill when the bucket is inverted at the top of its path, we are observing an example of centripetal force in action. This force is directed towards the center of the circle and is essential for keeping the water inside the bucket despite the inversion. The centripetal force needed to keep the water in circular motion is provided by the tension in the string, and at the top of the path, it must be greater than or equal to the force of gravity acting on the water. If this condition is met, the water remains in the bucket even when it is upside down, overcoming what we typically expect from the effect of gravity.