It can be normal for some dishwasher machines to run for 3 hours to wash the dishes.
Some dishwashers are less powerful with less powerful motors, slow to fill water up etc so it can be normal for some dishwashers to run for 3 hours.
However some other dishwashers run for only 2 hours.
If your dishwasher has just suddenly started running longer then your dishwasher may be getting calcium deposits buildup in the water lines or in the drain lines as well.
Or the dishwasher could be getting clogged with food debris as well.
Sometimes cleaning your dishwasher can make it work better.
The reason dishwashers take so long to wash dishes is because of the cycles the dishwasher has to go through to get your dishes clean.
First it takes some time to fill the dishwasher machine up with water, then after the dishwasher is filled with water it begins the wash cycle where it sprays the detergent and water onto the dishes for 5 to 10 minutes and sometimes a bit longer depending on the dishwasher.
Then it has to go through a rinse cycle and then the heating element slowly heats up to dry the dishes.
Some dishwashers also are able to heat the water up to a high enough temperature and if so it takes time for the water to be heated.
Most dishwasher machines take 2 hours to wash dishes.
However before the new dishwashers most dishwashers took about 45 minutes at most to completely wash the dishes and rinse them.
New dishwashers are supposed to use less electricity, water etc but if they run longer then they are not all that energy efficient.
Also new dishwashers barely last a few years unless you get a high quality dishwasher like a Bosch dishwasher.