To be fair, while it's weird from a modern perspective, medieval nobility often adopted children, just to give them a proper status, so they can marry them off to either their own family members or other noble families to make connections. Same with royalty.