One of the most basic principles of piloting underway is keeping track of the bearing to a prominent landmark or light as a way to set limits on your location. Perhaps the most notorious example of this is the 24 year old AB Lookout telling the 39 year old Third Mate in charge of the Exxon Valdez that the red light on Buoy 6 was on the wrong side of the bow. In fact, she told him twice. The grounding and subsequent tragic oil spill that followed affected the lives of thousands of people for more than a decade. The circumstance of the incident is illustrated below.
Figure 1. Glacial ice from Columbia Glacier had stretched across the shipping lanes, so the southbound ship was given permission to temporarily leave the lanes to go around it by the green route, which was not uncommon. But the officer in charge failed to turn in time and wandered off course as noted by the red line. The grounding occurred at 0009 AST (Alaska Standard Time). The Lookout reported the light was on the wrong bow, implying the ship was not where it was supposed to be, at 0001 AST.
Normally we would not rely on buoy locations for crucial navigation (because they can move), but this was a very important buoy whose position was carefully monitored, nevertheless, it has since been replaced with a light on a beacon fixed to the reef. The chart above is one for the time of the accident in 1987 that we found in the NOAA archives. Other details are from the official NTSB report.
Returning back to the task at hand... A single bearing to a target does not tell us exactly where we are, but it does tell us a line we are on that goes through that target, which is a line of position (LOP). If we sail off that line, the bearing to the target changes. We still do not know precisely where we are, but we know from the change in bearing what side of the original line we are on. This is the principle of the danger bearing.
For example, if a lighthouse bears 090 at the moment, I can draw that line on the chart. Start at the lighthouse and draw a line in the opposite direction, 270. As I proceed away from that line the bearing will get smaller or larger. We may have to look at a chart and compass rose to picture this numerically, but if the bearing gets larger, i.e., 090 goes to 095, goes to 100 etc, then I am sailing north of that line. If on the other hand, the bearings get smaller, i.e., 090 goes to 085, goes to 080 etc, then I am proceeding south of that original line, as shown in Figure 3.
How fast the bearing changes depends on how far away the target is located. This type of navigation reckoning is generally done with fairly close objects, within a mile or so, not with distant landmarks on the horizon, whose bearings barely change as we move. If an object is 1 mile off, you will get a 6º bearing shift for every 0.1 miles off the line you move.
Now we can see how to apply this concept to a "danger bearing." Suppose we want to transit the area from A to B in Figure 4, and we know there is a north setting current that might push us onto the underwater rocks. We have other ways to guard against this especially if we have radar, but it always pays to use all methods possible, plus we might not have radar, nor any electronic aids, so these basic methods remain crucial.
Figure 4. A danger bearing set up to guard against getting pushed on to the rocks. We need to stay below the 074 bearing to the light which means we monitor the bearing of the light and it must stay below 074. If the bearing slips to say 076 and 077 we have been pushed across the line
Added Apr 27, 2022.
In response to an interesting question from Andrew in the comments: the answer is yes, there is still warnings in the Coast Pilot about ice over the full region at times, but almost certainly it must be less, which brings up your second question. How much has Columbia Glacier receded in this period, ie 1987 to 2022. See the new chart below to show that the Glacier has moved back well over 7 nmi.
This picture is made using item (6) from starpath.com/getcharts.