Did any of John and Annie Cockle, and William and Elizabeth Pearson, leave a will? Or, indeed, any of their parents? If so, there might possibly have been a bequest to Charles, along with an explanation of the relationship if it wasn't entirely as it appeared.
For example, since Charles wasn't a legitimate son of William, the only way he would have been able to inherit from him would have been if he was explicitly mentioned in a will. And since there was no formal adoption in those days, then if, say, he'd been informally adopted by Elizabeth he wouldn't have inherited from her unless similarly mentioned. A will that named someone like that wouldn't necessarily explain the relationship, but it might.