There are third-party databases maintaining a list of CNAM fields as a service to all providers. You're right. It should be a simple binary lookup. However, the third-parties charge a fee per lookup.
I don't know how Cox provides the CNAM. From my experience, if the spoofer provides one, Cox will relay it. If Cox has it associated locally on file, Cox will insert it. If Cox doesn't do a lookup, they'll either display [City] and [State] or Unavailable.
It's weird. When my Mom moved into a new house a few years ago, her provider updated her billing address but misspelled her last name. I told her of the mistake and she immediately took care of it. However, even after these few years, I still see the misspelling.
Before the move, her name was correct. After the move, Cox relayed the misspelling. Since her correction, Cox still provides the misspelling. It's always been the same number. What prompted Cox to update the misspelling but not the correction?
Anyway, Cox won't pay to lookup each call.