This question can best be answered by reading Chapter 3 in In the Garden of Beasts. The answer can be best seen at the very end of the chapter. According to Erik Larson, Martha told Bassett Roberts, to whom she was secretly married,
I had to choose between him [her father] and “adventure” and you. I couldn’t help making the choice I did.
This pretty well sums up why Martha went to Berlin.
First, she went because her father wanted her too. William Dodd had always been particularly fond of Martha as his only daughter. They had a special relationship and she felt as if her father needed her. This was particularly true in this circumstance where her father felt that he was getting near the end of his life and the family had little time left to spend together. Thus, her father was one big reason to go.
Second, she was a bit of an immature thrill seeker. This will become even more clear as the book goes on. She was not really ready at that point in her life to settle down and be a wife. She wanted to live it up and Berlin seemed like an opportunity to do that.
For these reasons, she went to Berlin.