It's very ethical. What is NOT "ethical" is all those "ethics" charges continually thrown her way. These were only going to continue.
Why put up with spending time in court when she should be on the podium preaching the conservative message.
After bankrupting a few of the Democratic partisan hacks... they will stop using the legal system. Of course, they'll probably ramp up the press coverage, but at least you've halted the offensive on one front.
She has the opportunity to spend the next three to seven years campaigning for conservative candidates; building up the grass roots of the party, which is its only chance to survive as a serious contender; raising funds, building an organization and earning favors to be called in at a later date; improving and strengthening her appeal to the nation at large.
She now can "run" without running. Nixon did it for eight years in the '60's, Reagan did it for six years in the seventies. Travelling around the nation, meeting people, giving speeches, raising funds, party-building face to face.
Leaving office frees her up to follow this strategy, and if in the end she decides not to run, she will have done a great deal for her country in the meantime.