Any piece of work that has taken time to complete can attract dust, so the phrase means the object is completed, and dusted, an action it is only worthwile completing when the object is ready for display, or sale, or work, or what ever. The final act to make the object presentable is to dust it - done and dusted.
I've no idea what was originally 'done and dusted', Xyz, but the horse-phrase you are probably referring to is the one that goes: "Home and hosed". This is a reference to the winner being back in its stable, after being washed and brushed down, probably contentedly munching its oats. This phrase is normally used - before a race - of a hot favourite, so sure is the speaker that it'll win.