Not just the shut off. My dishwasher's drain hose goes up into the sink's drain plumbing much higher than I would have thought.
This almost made a mess when the sink was clogged and the dishwasher tried to pump the water out but had nowhere to go.
You can install airgap for this. In usa building code mandates it on multiple states
You can install airgap for this. In usa building code mandates it on multiple states