Google does not know why some roads are restricted or if they do know, they do not care.
In my area there is a big factory where there are through roads on the grounds, but nobody is allowed on the grounds but factory staff which has good reasons to be there. So also no off duty staff and usually the staff has to use the nearest entrance to where they need to be, not crossing the grounds for an exit on the far end.
Google does suggest using the roads through the factory grounds as 'restricted roads' at times.
On the other hand, a lot of roads in the Netherlands are through roads for cyclists but cars are only allowed for access. Most of the time there is a block in the road somewhere that can be taken out for emergency vehicles. Often those stay out for the gritting crew in winter.
Those roads will also show up in Google map routes with 'restricted road' warnings, even when you have the right to use them to reach an address on the road or use them on a bike without the restrictions affecting you.
So if Google mentions a restricted road you will have to check whether it affects you. Street view is a good help.
Something as big as a factory will show up on the map, with clear boundaries.
But a sign on the side of the road will not show up on the map, you can often get a clue on the satellite view as well as on street view if offered for the area.
But in some cases you just can not get information online and will have to sort out which part of the route is not available by checking out parts of the route and see where the warnings are for. And see if there are alternatives for that part of the route.