How can CloudFlare offer a free CDN with unlimited bandwidth?

It does not offer unlimited bandwidth. Unlimited bandwidth does not exist and is an impossibility. Only a marketing term indicates "the limit is greater than that required by most users". There is always a trap somewhere when everything is unlimited. With something that says unlimited, you are worse off than a service that has a known limit (or pay per use).

Lily:
https://www.cloudflare.com/terms/

SECTION 10: LIMITATION ON NON-HTML CACHING

You further agree that if, in the sole discretion of CloudFlare, you are deemed to have violated this section, or if CloudFlare, in its sole discretion, deems it necessary due to an excessive burden or impact potentially negative on CloudFlare systems, a potentially negative impact on other users. , server processing power, server memory, abuse checks or other reasons, CloudFlare may suspend or terminate your account without notice or liability to you.

So, if you cost them too much, they may stop providing you with service without notice.

In addition, what guarantee do you have that their service will not have a major breakdown if you pay nothing?