The answer to that question is simply: Genetics.
If both parents have CF :100% chance that the child will have CF
If one parent has CF and the other is not a carrier:
0% chance that the child will have CF (barring the very unlikely event of spontaneous mutation)
100% chance that the child will be a carrier
If one parent has CF and the other is a carrier:
50% chance that the child will have CF
50% chance that the child will be a carrier
If both parents are carriers 25% chance :
that child will have CF 50% chance that child will be a carrier 25% chance that child will neither have CF nor be a carrier
Note 1 The chance of any one child having CF or being a carrier is as shown above; the presence or absence of previous or subsequent children from one or both parents has no effect whatsoever on these chances.
Note 2 No carrier has CF.
Note 3 These chances of having CF or being a carrier have nothing to do with the severity of the symptoms suffered by someone with CF.