Because they don’t have internet access to download the gps almanac or ping the apple/google servers to ask where the wifi ap they saw is located. And they aren’t always on so they have to get the gps fix from scratch rather than maintaining it which is faster.
Sure you could put a mobile modem and internet connectivity on a camera, but it adds price, reduces battery life, and doesn’t really have any advantages over a phone companion app
So why can't cameras do it? They are the same form factor, could be a feature to enable. My smart garmin instinct can track gps for a day, and it's a tiny sportswatch.