It's all about the land. And feudalism.
Original title in land belongs to the king, and everyone else is in fief or sub-fief, but right to hold is inherited. Once you give away land to someone to hold, they and their descendents can hold it forever.
Land is often the only wealth a monarch has. He has no cash, no jewels, no chattel to dispense as rewards or salaries. So the only way a monarch can win friends and bribe enemies is to "reward" them with land. But land is finite and runs out. And a piece of land, once given, is gone. You cannot give it away again. Unless the family dies out, then you get the land back and have the chance to give it away again.
The only way to ensure land title is "lost" and returns to the original owner is to ensure families "die out". So you want to make the law of inheritance as narrow as possible to increase the probability that there is no legitimate heir. No girls. No bastards. No adoptive children. No corporations.
Alas, what applies to the vassal also applies to the lord.
Before the 9th Century (when feudal rules became entrenched), legitimization of bastards was generally a lot easier.