I had something like this happen. The driver pulled up, was in the back of the truck for a bit, and then drove off. I was looking at the UPS app and saw that it showed my delivery was right outside.
It was then marked as delivery rescheduled (for Saturday), but I was watching, and there was no delivery attempt. So, I called UPS. They said that code meant there was a delivery attempt and then promised me a callback from a local dispatcher. The dispatcher called and said that the driver said that his handheld immediately prompted him to keep it (something including "return to clerk"). I pushed back, saying that didn't make sense (the dispatcher suggested it was Apple saying to not deliver it), and the dispatcher promised to have a supervisor call me.
A little while later, I got a call from the same dispatcher saying that the driver would be by soon to deliver it, and that there was some issue that they were sending out to all drivers (from the local dispatch). When he came to the door, he (unprompted) showed me what the scan popped up on his handheld, and, sure enough, there was a message about not delivering it. He overrode that and delivered it. I suppose that this is a thing that happens, so he followed instructions and moved on, but there was some issue causing some iPhones to get flagged this way (as messages were bouncing around after my call, he had another similar thing happen in a nearby neighborhood with another iPhone).
I have to say, the explanation sounded like total BS until I saw it. On the other hand, having used the UPS app and website, I don't find it too hard to imagine that their tech infrastructure has issues.