Of course I haven't used (and for that matter not sure I've seen) a white pages in years. But yellow pages can still be somewhat useful for finding local services of various types. A lot of local service businesses are still pretty bad about online presences.
Yellow Pages may have been good for finding local services of various types, but it was also useful for retrieving the entire password database for offline inspection. Sun eventually improved their online presence and security, and renamed Yellow Pages to Network Information Services after losing a lawsuit by British Telecom.
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.