CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.) CentOS is free, however, we ask for a small contribution.
In short this "North American Enterprise Linux vendor" is Red Hat which provides the source code to their RHEL, that's why it is free software (as in freedom, not price as you can see from RHEL's prices