In Australia we certainly don't have those people, construction companies just use a few signs, some cones and barricades and that's all that is required to be compliant. If someone falls in the hole they shouldn't have walked past the cones!
Not the case in Victoria. Pretty normal to see a couple of workers standing near the site entrance making sure pedestrians don't get run over by a truck. Or standing in front of a closed footpath, directing pedestrians to cross the road.
There's pretty strict rules around keeping the public out of construction sites and excavations. Putting a couple of cones around a hole is definitely not all that's required.
There's absolutely a limit where adding another person only adds marginal safety. For instance, children who don't know they should not jump to jump a barrier and then go into a pothole should not be allowed alone on the streets. We are not talking about a random hole in the street, these things are already heavily warded in Japan with barriers and signs AND on top of it there's also workers AND on top of it the mentioned security guards. My argument is, many or all of these security guards are not needed.
Here is the thing: there are adults who know all this and they fell into a potholes by accident, or momentary negligence
How would liability play out for the construction company in a Japanese court? It's already a low margin competitive industry so passing risk management costs onto customers (the cost of the people monitoring the holes) is likely more practical than risking all profits evaporating and years of litigation, especially if insurance has anything to say about it.