Don't you want your game to be fun?
Yes, I do. I think you are not understanding the conversation.
Is failing the only option?
No, failing isn't the only option. In fact, in the most common forms of railroading failure isn't an option. The most common employment of railroading is to prevent player or party failure because the GM perceives failure as not being fun for anyone. For example, it's very common for GMs to fudge in order to prevent undramatic PC deaths, or as in my example above to avoid punishing the whole party for one player's failure of wisdom and seriousness.
I learned that RPGs are about solving problems and having fun doing so. What is gained by the GM not wanting the party to succeed?
I don't even understand the question in context. As I said, most of the time GMs justify railroading because they want to the party to succeed. They aren't railroading to create story failures, but to create drama. Whether or not this is a good thing is a matter of debate, though almost everyone agrees that some amount of loss of agency is bad and total loss of agency is always bad.
It is of course possible that I don't understand what this conversation is about at all.
I think that's likely.
The classic definition of "railroading" used to be that the GM doesn't allow the players to make their own decisions either outright or otherwise. Sometimes players do things you don't want them to do. That's just how it goes.
Yes, but turns out that definition of "railroading" is very very broad. And what you'd see is that different people would treat different things as unacceptable. The arguments got so bad that I even saw a particular faction say that game prep was itself railroading because if the GM prepped something the expectation would be that is what you would do. At that point, I felt I really needed to sit down and think through for myself what was going on with this whole player agency deal, and I started to realize that there is no such thing as unlimited player agency. All player agency is limited in some fashion as an inherent aspect of play, and that in many cases it is limited by conscious choice of the GM - even GMs that are running so called 'open worlds' or 'sandboxes'. The question is, what is or is not an a good conscious choice of limiting player agency? And granting that players always have limited agency, how do we go about giving them a reasonable amount of it?
Player agency is just a new fancy way of saying "playing the game." I would not continue in a game where i wasn't allowed to have an impact.
No, it's really, nor is that necessarily true. Consider a game like Half-Life or Half-Life II. Despite the apparent freedom you have, you are really on a mostly linear ride. Everyone's versions of the game plays quite similarly, and even the creative ways you solve a puzzle are scripted out and in fact the way everyone solves them most of the time. You may not in fact notice this the first time through, because you are having a lot of fun for a lot of different reasons. And everyone gets to the same end, so in what sense are you having an impact?
You might say, "Well, computer games are different than roleplaying games." and to a certain extent that isn't true, but within a table top game it's entirely possible that you could be presented with a scenario, make a bunch of choices a long the way, have a lot of fun, and yet everything that happened was prescripted and the ending was foreordained based on carefully steering your choices and the expectation of player success. All the other endings were just deaths and failure. If you didn't notice the walls, would you not have fun? And could you or would you notice the wall the first time through when you weren't looking for it and weren't trying to take alternate paths?
I hope you find the answers you are looking for.
This turns out to be a really complex topic. You said that agency is a fancy way of saying "playing the game", and I disagree. But I do think that addressing what makes for giving a player sufficient agency is pretty close to addressing the topic of "what makes for a good game".