Hot water mystery

Hi all!

We have a mystery going on in our house. The only way we can get really hot water flowing is if we run the dishwasher for a couple of minutes first. Otherwise, the water gets warm, but not hot. Any ideas why this might be? Thanks in advance!