1. You don't pay money for it. 2. The company behind it uses it to make money.
In Fedora's case, it's kind of a public beta of RHEL. In Ubuntu's case, Canonical provides support and professional services, although it's not profitable yet.
Also, Ubuntu comes by default with no non-free software. Although now I think there's an option in the installer to install MP3 and stuff that's restricted by patents. (not sure if it also installs non-free stuff like Flash).