The most important thing, in that time period, was to have a male heir. Females were not to inherit and were not considered wise enough to rule a kingdome. Ideally, a monarch should have several sons in case of illness, murder, or any number of other life-threatening situations. The more males, the more likely the succession is guaranteed.
Plus, it's the ol' manly-man thing about producing a male heir