Marietta Edgecombe betrayed the Dumbledore's Army because she was afraid that if she was eventually discovered to be a member of it, her mother's job in the Ministry would be at risk. Instead, she decided to come clean about the Dumbledore's Army to Dolores Umbridge in return for immunity from her mother's job in the Ministry.