You sure it wasn't a crow (actually they are called 'little ravens')? They actively hunt weaker animals, particularly birds and your poor ol domesticated duck was not toughened up by a life in the wild mate..you gotta keep em safe .. Magpies don't attack unless protecting young or if feeling threatened. I have seen little ravens and magpies coordinate attacks on a cat, distracting it from the front while others swooped and grabbed its tail.
The mother in law rescued a bunch of wild ducklings that the mother had abandoned on a nature strip in the middle of a busy road. She had a big block with ponds / water feature and put em in there, got the vet to suss em out and just put them in a chicken mesh thing during the night, got the dog to bond with em and look after them during the day. Was hilarious they followed the dog around, and he used to get in the water with em. Two of them still come back and visit the house to this day, have a swim, bit of a snack, its pretty cool. If you don't put em away, you got foxes, cats and I dunno bout where you are but quolls, eagles/hawks, snakes even goannas, tigers oh and sharks etc.