In the United States it’s still a law in many states that landline providers are required to provide a printed white pages, which they subsidize with yellow pages (ads). It’s a legal anachronism.
I've not seen a phone book since moving to Norway, and just realized it after reading your comment. In the states, I'd get at least one every year - sometimes two - and it didn't matter if I wanted one or not. I honestly think they print them because businesses pay to be in them.
>I honestly think they print them because businesses pay to be in them
Well, sure. That's what the yellow pages basically are--advertising for local businesses. (There may be some level of listing that's free. I don't know.) As other have noted, my local yellow pages is pretty small and thin these days though with the caveat that I don't live in a city. I suspect that a listing/ad is no longer quite the requirement for local businesses that it once was.