First of all, John Proctor is asking Mary Warren to testify in the first place in an effort to clear his wife's name in the court. If Mary says that what the girls have been doing in just "pretense" then Elizabeth would get to come home.
Abby is the ringleader of the girls. If Mary goes against the girls and tempts Abigail to be upset in any way, Abby would do what she has done to everyone else in the story who has crossed her: accuse them of witchcraft. Mary isn't stupid.
Plus, any normal teenager understands other teenagers. Mary knows if she doesn't conform to the group, she will be considered an outcast. This demonstrates the motivation to go to court to counter the girls is not in Mary's best social interest.