To me, an AP is an already written story with fill in the blank slots for the protagonist's names. If the basic progression of the storyline is already known what's the purpose of playing it all out?
Well, hopefully the players won't read the adventure beforehand, so it'll all be new to them. The purpose of playing out a premade adventure is the same as the purpose of playing out a story-based video game: to find out what the story
is and how you can change the story depending on how you do x or y.
Personally, I'm OK with railroading so long as it's not blatant -- that is, so long as I at least have the "illusion of choice" (eg. the GM has only prepared one encounter even though he's given us two paths from which too choose ... and he'll end up running that one encounter, with some adjustments, regardless of which path we take ... and we'll most likely be known the wiser).
The kind of railroading I don't like isn't so much related to any conceits of the overall metaplot of an adventure but more when the GM dictates what happens in a situation where my character ought to be able to have a say in the matter or even goes so far as to tell me what my character does (although even this can be acceptable in certain situations, such as cut scenes or intros, so long as it's just done to advance the plot in a positive way). An example: the guy GMing SWSE before me hit our brand-new ship with a meteor that just so happened to destroy not just the main hyperdrive but also the backup hyperdrive
and conveniently shook the ship up enough to break the spare hyperdrive in the cargo bay ... all so that we would get stranded on a particular planet so we could find something we were supposed to find there.
The thing is: even in an open-ended sandbox game, you can still end up with a bit of railroading. For one thing, you can only ever choose to go down one path at a time. If the GM presents you with Path A and Path B and you choose Path A, you won't know whether Path B was really any better/different unless you play the same adventure/scenario/whatever again and choose B the second time around.
To use the Neverwinter Nights series of CRPGs as examples, I would say that NWN1 demonstrates the "good" kind of railroading, while NWN2 demonstrates the "bad" kind.
NWN1 has a set story, yes, but it gives you many options. In each act, you are given a "home base" and multiple adventure paths leading out of the base. You are completely free to choose what order in which to follow those paths. Each path also includes several little sidequests that you can either follow or ignore. The game assumes that you will arrive at a particular destination, but it gives you some leeway as to how you get there.
NWN2, on the other hand, leads you by the nose from one place to the next with no say in the matter whatsoever really. If you want to progress the plot/gain levels/etc, then you'd bloody well be prepared to go where the game tells you when it tells you to go there. And in the few instances where it gives you the illusion of choice it smacks you in the face with its blatant "It doesn't actually matter which choice you make here, you're going to end up with the same result" railroading (eg. the sham trial where winning or losing doesn't matter because you end up having to fight the frenzied berserker dude in a "trial by combat" no matter what; and the cut scenes that assume you're playing along with the romantic subplots whether or not you actually bothered to pursue those lines of dialogue in-game).
As a player in NWN1, you know that the game is leading you in a particular direction. You also know that you can't really affect the overall outcome of the metaplot. But you
can still make some choices, as minor as they might be (eg. Doing the quests in the order of 1-3-2-4 or 4-2-1-3 instead of 1-2-3-4 order).
As a player in NWN2, you're more of a spectator than a participant. You're just along for the ride to see where the game takes you. Once you play it once, there's really almost no reason to play it ever again.