The monsters are gone now, come down!
Giant pandas clearly are following poor lifestyle choices in an awful environment, and doing poorly as expected. But WHY did they get this way? If a group of once-successful bears moves into a marginal area and starts living on nutrition-poor food, they will not develop into a new species. They will die out instead due to poorly adaptive behaviors. For giant pandas to get where they are, their current lifestyle had to be POSITIVELY adaptive at some point in their past. They had to be more successful than "regular" bears, as weird as that first sounds.
When does it pay to live somewhere marginal? When the better living conditions are full of monsters or endemic disease. Somewhere in the past, something nasty arrived to decimate panda populations. The survivors were driven up into the mountains, where there's not much high-quality food to eat. Meanwhile down below, the rest of the population was wiped out or driven away. Eking out a bare living beats dying any day. I suggest the giant panda is a survivor of such an event.
Every giant panda alive is descended from the ones most compelled to live high and eat bamboo, so that lifestyle is very strongly wired into them. The problem is that now the giant panda could be making a better living farther down with a broader diet. The monsters are gone or the epidemic has faded into the background, but the panda keeps living on the fringe. In the new context, their once-successful behavior has become extremely maladaptive.
This happens in the natural world all the time, and it might require some pretty weird changes to survive. When the crisis has passed, the survivors MAY eventually try different behavior and become better adapted to the changed environment. Some do not and fade away into extinction. Barring a radical change in behavior, the giant panda - in the current conditions - is indeed a failure and would probably die out eventually without human interference or assistance.
They're miserable losers now, but in the past this lifestyle was their only chance to keep the species alive...