Probably a question for another thread... When did phones start auto-putting categories against pictures?
Android thread will tell you when it started on your phone, but the thing which makes it happen is uploading images to cloud storage and having your operating system provider's AI look at them and try to guess what they are pictures of.
Your phone OS spies on you even if you don't use the cloud storage explicitly. You don't need to have full resolution images uploaded to their server, AFAIK the AI which categorises image content works better with less detail so thumbnails will do.
Android thread will tell you when it started on your phone, but the thing which makes it happen is uploading images to cloud storage and having your operating system provider's AI look at them and try to guess what they are pictures of.