Magots are attracted to decomposing waste, which is one of the reasons they are in your backyard. The rotting stuff attracts flies, laying eggs in the rubbish and hatching them into maggots.