There were cameras with FTP or WebDAV support, when connected to WiFi. I guess it’s just not really popular?
I don't think I've seen one that actually worked. The closest one was a third-party app for a Sony camera that used the Picassa/Google Photos API.
Those always existed but I suspect it's for some highly specific business use cases, something like fashion magazine photo studios or some R&D facility infra. They're not for reliably syncing photos over the Internet.
Or maybe it's just the matter of someone writing a single executable installer to set up the host for those but I don't know...