English Translation
Why did you agree to do it?
sich bereit erklären = to agree to something
Why did you agree to do it?
sich bereit erklären = to agree to something
Almost.
“sich zu etwas bereit erklären” is the full/correct expression.
In English, if you say just “to agree”, then somebody might ask “agree to what?”
Similarly in German: if you say just “sich bereit erklären”, then somebody might ask “zu was?” (or alternatively “wozu?”).
You might answer: “to it”, or in German “zu dem” or, more naturally, “dazu” (if you want a literal translation of “dazu”, something akin to “there to”).
“to agree to it” translates to “sich dazu bereit erklären” (to agree to that there").
If you don’t know what “it” (or “that there”) is in this case and you’d rather say “something” than “it”, then replace “dazu” with “zu etwas”.
Also important: “sich zu etwas bereit erklären” has more the meaning of “to declare oneself ready/willing (to do something)”.
thank you for the clarification.