To begin with, in some situations and instances sentences like "the daughter of a king" would have less impact if there were some other kings around.
One would expect "the daughter of THE king" which would be more specific in nature.
But they really use "of a king" sometimes with a "daughter the king" meaning these days:
Gwynne (daughter of a former Head of the English Department in a Comprehensive School). the author of the sentence here, meant that Gwynne is a daughter of the Head of the English Department (at a given time) which would reinforce/endorse her knowledge of grammar (and as an author of a book on grammar).
The king´s daughter would mean "the daughter of the king", so it doesn´t lead to ambiguity. It´s not say that the use with apostrophe is wrong, it´s just to heed the usage with the definite or indefinite article there, sometimes it may convey different ideas.