Murphy's Law. Bad Luck. Crappy Timing. There's a lot of stuff that can happen to your home as you prepare to list it for sale.
And it's understandable. As (most of) you begin the long slog of de-cluttering, primping and getting ready for photos, some problems are revealed. Could be a wall that needs painting (once the bookshelf is removed). Pitch that aging and ugly recliner and suddenly a stain in the carpeting is revealed. Or, as one client recently experienced, a difficult to replace shower slider broke just days before settlement, having worked perfectly for all the years they lived in the house. But of course!
Sometimes the momentum is such that it's impossible to repair/fix/replace the item before the house goes on the market. One can let prospective buyers know that the item will be tended to prior to settlement. Or, in some extreme cases, the item can be "disclosed" as faulty and the buyer can decide themselves if it will prevent them from making an offer.
If your house is under contract and the dishwasher blows, unfortunately, it's up to you (Seller) to replace it. Even if your house is being sold "as-is", if the darned thing was working when you signed the paperwork, it is your obligation to deliver the property to the new buyer with a functional dishwasher. The only exception might be for a tear-down, in which case the buyer might not care.
Over my 15-year career in real estate, I've been involved in purchases and sales where furnaces have been replaced (twice!), basements have flooded, microwaves have conked out, roofs have leaked, and trees have been condemned by the county... all in between contract and settlement (and that's just the stuff I can remember today). Colleagues of mine have fared worse, with entire houses burning down, sink holes emerging, pest infestations, and more. Yikes.
The good news is that the majority of sellers have insurance for the major stuff. And buyers, if it can't be remedied, you will not be forced to go through with the purchase. There are protections out there for both parties.