It wasn't because software bug, but this is how "Mamonas Assassinas" died, basically during a missed approach the pilot turned the wrong direction (but with the correct radius and all) and crashed into a very tall hill near the airport.
It wasn't clear to me what the exact problem was from reading the article, just that it occurred under a very specific and uncommon set of circumstances.
> "This issue will occur in departures and missed approaches where the shortest turn direction is different than the required turn direction onto the next leg if the crew edits the 'Climb to' altitude field."
> The FMS may change the planned database turn direction to an incorrect turn direction when the altitude climb field is edited.”
Airports have landing procedures, essentially a list of waypoints and altitudes. A landing aircraft has to fly that route down to the runway.
Each list has Missed Approach Point, at which the list branches into two: landing or abort.
If you are not ready to land at that point (too fast, can't see runway, previous aircraft still on the runway, etc), then you fly the abort part. Usually it tells to climb to a certain safe altitude and turn towards a waiting area for another landing attempt.
These procedures can be flown manually, or activated for autopilot to fly. A bug made the autopilot turn in opposite direction to what's in the abort section.
The narrowing beam is instrument landing system that guides you towards the runway. If you reach 4580 feet minimum altitude during approach, but can't see the runway, you must fly the abort procedure, which is drawn with dashed lines: climb immediately to 4700 feet on current heading, keep climbing to 9000 while turning to heading 021, then proceed north at 9000 on 336 degree radial from Helena radio beacon, and upon reaching waypoint WOKEN circle until further instructions.
This bug could cause the aircraft turn southwest (towards mountains) instead of northeast (valley).
At Helena, the bug would not reveal itself because the right turn is 114 degrees. If the procedure required to turn more than 180 degrees right, for example, 200 or so degrees right towards SWEDD, the aircraft would make a left (shortest) turn instead. Green should be flown, red would be flown: https://i.imgur.com/ojShQa2.png
Many airports have construction cranes up to 200' high in the airport area.
The US uses heliostats along the southern border (tethered balloons, with multiple guy wires) to at least 1000'.
Airliners are moderately tall on the ground, so that's something else you can hit if near enough to the departure end on an adjacent taxiway or runway.
There are illusions when flying at night that confuse your sense of bank, so without looking out the window, only instruments would indicate a wrong turn. Look away or get distracted, and you just hit something.
In addition, airline pilots aren't test pilots. There is an assumption that systems are unsurprising from one second to the next, and that a checklist can be used if not. An unexpected turn at ground-level would often turn out badly.
I would add that the pilot might not fly the published go around procedure (hence mess with the altitude parameter) for various reason. There is an interesting video on YouTube where the pilot has to ask for a special procedure before landing because the published one would send him into a thunderstorm cell in case of go around.
There's two components in a turn - the desired heading at the end of the turn, and the direction you should turn to get there. Setting the "Climb to" altitude appears to have cleared the turn direction information. In the absence of that, the computer will turn in whichever direction results in a shorter turn to the desired heading. This is usually what you want, but not always, so I can understand it taking a while before anyone noticed it.
Passengers fear falling out of the sky, but that's a pretty rare thing with airplanes.
A dive at altitude would give you time to react, usually minutes.
Hills are invisible in the dark.
Also, charted departure instructions are something you bet your life on, as well as your passengers. So if you don't trust the plates or FMS, you can't fly in IMC or at nite.
Doing an unauthorized departure turn can impact terrain. At night, it may not even be noticed by the pilots.
Source: commercially-rated pilot.