I think it's supposed to make your phone notify you if you move and there is another unknown BLE device constantly moving with you. That means someone put one of those small keyfobs in your backpack. It'd be a known BLE device if you put it there yourself and added it to your account.
There is a threshold. It won't complain if you're 30mins on the train. Or driving 2h with a friend. But it will make a noise if something is following you for the better part of the day. I made up the numbers, it's been a while since I read how those things are supposed to work. And I think they changed things. AirTags will beep at random intervals like a smoke alarm once they lost sight of their paired iPhone. That's so other people can find them. And Apple can also see if the paired iPhone is traveling along. So they can make a distinction if someone put a tracker in your backpack, or if it's in their backpack and they're sitting with you in the car.
ok, the phone doesn't register every ble device it sees, just tracking ones...
and then there's an issue of registering the trackers, and some encryption involved.
it still doesn't work and some neato undetectable trackers have already been made, thanks to apple's implementation.
Third party apps like AirGuard will track all BLE devices and beacons around you, recording the detection location on a map. I just checked mine and it's full of random iPhones, "Find My" tags, AirPods, and just 1 Tile
It also has a separate risk analysis section for tracking tags whose identifiers may be randomized for privacy
air guard is really good... but with the fake ones that randomize the mac address every beacon, it just registers a weirdly high number of devices... you have to look at it manually to catch it...