How do iphone backup extraction programs work? There are a plethora of applications (usually expensive ones) that can extract a backup file of an iphone's data.
(examples: drfone,  anytrans)

How are these apps actually accessing the iphone's file system, allowing them to extract a backup database file?

No matter how hard I look for the answer, I'm just pointed to these apps. How can any user extract a backup file from a usb-connected iphone?
The apps usually just initiate a backup themselves first, having their own implementation of the iOS backup protocol (or using libimobiledevice libraries). So, they're not really directly accessing the iOS filesystem via USB, they're making a backup in their own app data folder, and then accessing that. (I work on iOS backup tools - not the ones you mentioned - and this slight of hand from other tools bugs me ;))


  How can any user extract a backup file from a usb-connected iphone?


Are you asking about how to get to one of the files in your backup, or how to download the files from the iPhone (aka acting like a backup client)? If you want to take your own backups without iTunes, libimobiledevice is your best bet. https://github.com/libimobiledevice/libimobiledevice