It doesn’t need to be constant or continual. I don’t talk continually near my phone, for one.
Siri and other voice rec is able to get words from my audio without appearing to affect my phone function or slow it down. There are plenty of times my phone is idle that it could be doing that.
Same with photos. When you give many apps access to your photos, as we know, they will analyze and/or transit the metadata of all photos on the device. It’s not hard to imagine going farther than that, and as noted, processing or data transfer could be deferred.