At first glance, I think most native speakers would agree with you, and say that both A and D are pretty much interchangeable. However, books like yours generally have a reason for making a distinction like this.
In this case, I think I've found it. From the Capital Community College's web page on possessives, we find:
Many writers consider it bad form to use apostrophe -s possessives with pieces of furniture and buildings or inanimate objects in general. Instead of "the desk's edge" (according to many authorities), we should write "the edge of the desk" and instead of "the hotel's windows" we should write "the windows of the hotel." In fact, we would probably avoid the possessive altogether and use the noun as an attributive: "the hotel windows." This rule (if, in fact, it is one) is no longer universally endorsed.
My guess is that your textbook is either somewhat dated, and was originally printed when this "rule" was more widely applied, or else the authors thought it would be worth making this distinction even if the rule is no longer universal.
That's likely why D is considered a better answer than A. I'm curious, though: Do the directions for this set of problems say to choose the "correct answer", or say to choose the "best answer"? Sometimes two answers can be correct, but one can still be justifiably preferred over the other.
Of course, in cases like this, textbooks would be much more helpful if the reasoning was listed in the answer key, instead of just telling readers that the answer is D without saying why.
Getting back to your question, you said:
I think A is also acceptable.
and I lean toward agreeing with you. But I think your book is also correct in that D is probably the "best" option of the four that are available, even if many native speakers sometimes ignore the rule about possessives and furniture. And you are definitely right about your Option E; in fact, the website even suggests this might be the best way to write it: The carpenter repaired the table legs. But that wasn't an option in the question.