Like said in the comments, even if you have a destiny knot, it won't always give it from the Pokemon that is holding the destiny knot. It's pure chance, you probably got lucky with the other Pokemon and had a good egg right away or soon. The Dreepy's IVs may not be very good and it happens to be passing down those instead of Ditto's, just keep trying and eventually you should get one that has the 5 Ditto IVs, also, if you want a perfect IVed one, you are gonna want the Dreepy/Drakloak/Dragapult to have the IV the Ditto doesn't. Also, don't save after getting an egg, and then hatch soft reset repeat. Save right before recieving the egg, because everything that will be a part of the offspring, the Species, ivs, shinyness, gender, etc.
Source: Knowlege and the comments.