I can’t speak to the cop, but I assume the construction robot was programmed to keep an eye on Caleb when they were working together (as basic safety “don’t let your human partner fall”), saw him tottering, and followed its programming without having any idea of the context.