In chapter 8 ofThe Scarlet Letterwe find Hester entering the governor's mansion because she has heard that the magistrates are thinking about removing Pearl from her custody, given that the child's illegitimate status renders her as a "demon child", or an "elfin", according to Puritan law.
As the magistrates speak to Hester, she begins to lose her temper and, after yelling out that she will not give up her daughter, she feels the sudden impulse to call on Rev. Dimmesdale to speak to the magistrates.
The reasons are many. If we go literally by what Hester says, then she wanted Dimmesdale to use his power as her pastor, and as the person whom she has trusted the secrets of her soul to convince the magistrates that she is not a bad woman, and that Pearl will not be led astray only because she is illegitimate; that Hester's scarlet letter has actually taught the woman much, especially about the care and love that she should place on Pearl.
Yet, if we read between the lines, we know that this impulse of getting Dimmesdale into the issue could have been motivated by other things. First, Hester was at a boiling point and perhaps, instinctively, she sought the help of none other than the father of her child, as the man of what would have been her family, to take charge of the situation and to help her.
Second, Hester may have subconsciously been so frustrated and "fed up" with the whole situation (and who wouldn't be) that she for once, and only for once, made Dimmesdale share the responsibility for some of it; after all, he fathered the child with Hester, even if it is all in secret. She was correct in including Dimmesdale into the situation, because the magistrates always listen to him, and because Dimmesdale has an undeserved charm over the community that he leads as a pastor.
Therefore, the combination of instinct, anger, and desperation is what mainly motivates Hester to call Arthur Dimmesdale to speak on her behalf.
Since Dimmesdale is her secret lover, she feels that he should speak up for her and Pearl because of his way of words to get them out of this situation.