The rubber hoses commonly sold for this can unexpectedly fail, particularly the hot water supply. Failure of these hoses are one of major sources of water damage in homes, and most people never even consider this until they are up to their ankles in water.
I was reminded of this the other day when one of these hoses began leaking after I had moved a washer slightly. The homeowner said the hoses were put in when the washer was installed - about fifteen years before. Rubber hoses need to be replaced at least every five years, or better yet replaced with stainless steel flex hose.
I never thought about them myself until I was at one of my mold trainings last summer and found out how often the rubber hoses fail. I went out and immediately bought stainless and now I sleep better at night.