When Abigail confesses that she has danced with the devil and wants to be free, does she do this because she is afraid she might get caught, or does she do it because she wants the attention of the town?
Abigail is very smart and is also a conniver. Arthur Miller describes her as having "an endless capacity for dissembling." That means she's an extraordinary and consistent liar. Abigail would have been in trouble for many things: going into the forest, sneaking out of the house, casting spells with Tituba, casting a specific spell against Elizabeth, dancing, disobeying her uncle...and who knows what else. Any one of them would have been enough to get her in serious Puritan trouble. Add to that her desperation to get John to re-notice her and to leave his wife, and you have a recipe for trouble. Abigail gets her trouble, it seems to me; however, she didn't get her man.
In the terminology of multiple intelligences, Abigail was very strong in interpersonal intelligence: She could read people and understand them. By confessing, she manipulated those with power over her. She told them what they could understand, confirmed their worst fears (and thereby validated their beliefs in witchcraft), and gave them a reason to feel compassion and pity for her. She gave them the opportunity to "save" her and protect her from the Devil, surely their moral duty. I'm sure Abigail didn't reason her way through the dynamics of her confession; her defensive behavior was instinctive and lying was her second nature. She knew which specific lie to tell because she understood her audience. Abigail must have been pleasantly surprised, I think, when she realized the extent of her growing power in the community, among the same people who had gossiped about her and treated her with scorn.
I believe that Abigail made her "confession" primarily to divert blame away from herself for her inappropriate behavior and in order to shift the focus toward others, such as Tituba. A secondary reason I see for Abigail's confession is in order to gain attention. Abigail is what we would call in contemporary times a drama queen. Her pursuit of John Proctor, a married man, underscores her desire for attention and her willingness to take risks to get it.
I would think that she is afraid that might get caught. Fear was enough of a motivator for people to deny everything. Did she actually say she danced with the "devil."?