There are several reasons as to why Mary Warren may have given the poppet to Elizabeth Proctor in Act Two. Mary tells Elizabeth that she has made the doll in court as something to do that kept her busy. However, Abigail Williams may have instructed Mary Warren to give the poppet to Elizabeth so that she could accuse Elizabeth of witchcraft. Abigail has already manipulated Mary into accusing innocent townspeople of witchcraft and it is well within her capabilities to convince Mary to give Elizabeth the doll for alternative purposes. We learn later on in Act Two that Abigail has stabbed herself in the stomach with a needle in the same location that the needle is stuck in the doll. Another reason why Mary may have given Elizabeth the doll was because she felt guilty and sorry for her. Mary knows that Abigail has it out for Elizabeth and perhaps she feels guilty for being aligned with a malevolent person.
I agree that Mary was manipulated into giving the doll to Elizabeth in order for Abigail to frame her for witchcraft. Mary may have felt sorry for spending so much time at the trial instead of working for the Proctor's and gives the gift as a bit of atonement, but there is little doubt that Abigail used Mary to get at Elizabeth.
Abigail has asked Mary to do this. Abigail at this point has gained control of the town. The people that she is accusing are being persecuted with little investigation. Mary fears Abigail, as she has a right to do. Although she tries to help the Proctors and tell the truth, she is quickly swayed by Abigail's intimidation. Therefore, her reason is to obey Abigail.