A network location is a network analysis object that is connected to the network; Also, its position on the network is input for the analysis. Some network locations, such as a stop on a route, can be located only at a discrete point on the network; other network locations, such as a line barrier that represents construction, can span a portion of one or more edges.
The above error message rises when the stop is prevented from going on the network location route. The warning message indicates that the network location for that point is on a street that is considered prohibited or non-traversable.
ArcGIS 10.X Network Analyst tool solves a route, but it doesn't route to the XY location of the point. Instead, the extension will snap the point to the nearest street and calculate some location values on that street. That's how the concept of the network location works.
The "Exclude restricted portions" setting causes objects to locate only on elements that don't have active prohibit-restrictions, which are restricted. Due to which the network location will not be placed on any edge considered prohibited at the time, thus, skipping any street considered prohibited and find the closest street which is traversable.
Note: There will be no error message for the same route in ArcGIS Pro as the “Exclude restricted portions ” setting doesn't exist.