Exactly, and I'd argue that this is still partially true today; marriage is a way of organizing the inheritance rights.for the upper reach of the aristocracy , sex and love has nothing to do with marriage
it's all about succession , primogeniture and inheritance
But this robs the legitimate spouse and her (since let's face it, it is going to be the male monarch sleeping around causing those bastards, more likely than not) legitimate children of their rights. It is even worse in a monarch's family, since it is not as if they can simply split the crown. So thanks to the King having a one-night stand, the Queen and her unborn children, can be robbed of their birthright. It is even worse in Futurist's original suggestion, where the bastard can already be born, and if the King feels like it, he can legitimize the bastard moments before the legitimate child's birth and ensure that the bastard jumps over the legitimate child in succession.Definitely, they should have the same right the fault lies with the parents not the child.
Furthermore, why would the illegitimate child's right trump those of the King's siblings and nieces and nephews? Why should a King's fling be a better monarch than, say, one of his brothers, who have been raised to the role as a spare monarch and has acted as his brother's representative time and time again? Note that in Futurist's suggestion, the childless King could legitimize a total nobody, claiming the person was his bastard, and then the legitimized bastard would inherit before everyone else.
There are good reasons that the succession rules were as they were, especially in the past.