What could be the cause of a washing machine hose coming loose?
Washing machines vibrate - an inevitable side-effect of an unbalanced drum turning - so anything not very tight will work its way loose over time.

The clamps usually used to compress the seal/o-ring are designed to be tightened using a screwdriver, and you want to get these clamps really tight. The o-ring will deform quite a lot as you compress it, but it is designed to do that.

Also, before you put the hose on, make sure the surfaces which will connect together are clean and dry - this will help reduce slippage.