It’s the fire risk that’s the issue not 20$.
Also, many dishwashers have a garbage disposal which isn’t inside the water and may fail if the cord gets into it. Not likely to happen, but enough people try it and someone may directly get an electrical fire while the dishwasher is running.