If Donkey never ran into Shrek, then they wouldn't have saved Fiona, which results in Rumpelstiltskin sealing the deal with Fiona's parents, resulting in Shrek either getting captured and enslaved like the other ogres or joining the resistance if he somehow manages to fight off a bunch of witches (or if he never gets found). So basically, Donkey is the reason why everything happened.