Dirty water in the dishwasher can be caused by a broken check valve or air gap. The dishes come out clean but there is dirty water in the dishwasher. If your plumbing checks out and water still appears in the dishwasher, the problem is in the dishwasher. Could be time to call the appliance doctor.
Your dishwasher water discharges into the garbage disposal. When the disposal has standing water, it is possible for water to drain back into the dishwasher. There should be two checks in the system to prevent this from happening.
First, there is a check valve on the discharge line of the dishwasher. It is there to prevent water from back flowing into the dishwasher. The only problem is that after years of soap, food and chlorinated water, the valve could be failing.
Second, an “air gap” should be mounted between the disposal and the dishwasher. An air gap is an anti-backflow device mounted on the sink that prevents water from draining back into the dishwasher. It has a round chrome trim and it is mounted next to the faucet. If anything fails, water would flow out of the air gap before it could flow back into the dishwasher. In the old days dishwashers did not have check valves.
The prevention of water draining from the disposal to the dishwasher was up to the installer to attach the drain hose to the bottom of the countertop. That way, water had to be up to the rim of the sink before it could drain back to the dishwasher.
Tip about air gaps: When the dishwasher drains, it pumps water to the air gap and the larger line that runs from the air gap to the disposal is a gravity drain. If the gravity line is clogged, kinked or too long, water will be forced out of the air gap. If water squirts out of the air gap, check the gravity line for kinks or clogs first.