Bedrockgames
I post in the voice of Christopher Walken
Well, suppose that in scene A the PCs befriend NPC X (resolved via application of the social resolution mechanics) so as to achieve goal P, while killing NPC Y (resolved via application of the rules for resolution of violence) so as to achieve goal Q.
And now suppose in scene B the GM has X turn on the PCs and thwart their aspiration for P; and has NPC Z, a newly-authored NPC, turn up to try and stop the PCs achieving Q by fighting them about it.
That looks to me like it could be railroading - the GM is not respecting the outcomes of resolution, and is manipulating the fiction so as to continue to press his/her conception of what it is going to look like regardless of what the players have their PCs do and regardless of success in action resolution.
I don't think the pattern of play I've described above is merely hypothetical, either. I've seen modules that encourage the GM to do both: modules that tell the GM to have a particular NPC betray the PCs without any regard to outcomes of social resolution processes; and modules that tell the GM to introduce a new oppositional NPC if the PCs kill the original one (Bastion of Broken Souls is an example of the second pattern that I remember especially well).
In my mind, this depends on details that are missing.
Is the choice to open the left rather than the right door supposed to matter? In that case, it seems railroad-y to me that the same thing happens whichever door is opened.
But if the choice is merely colour - like a player choosing the shape of a PC's belt-buckle - then it doesn't seem railroad-y.
A complicating consideration is that, for purely historical reasons, D&D play obsesses over architecture and geography whereas it largely neglects belt-buckles (contrast, here, The Dying Earth RPG), and so there is a weight of convention to at least pretend that choosing the door matters in a way that choosing one's clothing doesn't. Breaking free of that convention can take a bit of an effort of will!
You are assuming here that the choice of door should matter. But maybe it's just flavour! In which case there's no railroad.
When my group plays Prince Valiant I'll often pull out the map of Britain in the front of my Pendragon hardback and we'll work out together where they're going on the map. But those decisions have ZERO implications for what encounters I frame. It's just to help me narrate "woods" or "swamp" in a consistent way, and to help maintain at least a rough consistency of which town or castle is near to or far from which other town or castle. This isn't railroading; it's just a different focus to play from a Cook/Marsh expert hexcrawl: the action of play isn't about which hex the PCs are in, but rather what happens when they meet the Huns? (As it turns out, they beat the Huns with their warband and then converted the bulk of them (who had survived the skirmish) to Christianity and added them to their warband as light skirmishers.)
Going through the left vs the right door may be significant in a map-and-key exploration game (eg Keep on the Borderlands/Caves of Chaos as presented by its author). But in a different sort of game it may just be colour. Hence why - as @iserith has said - there can be no de-contextualised answer to @Urriak Uruk's question.
Treated as rhetorical, I feel the force of your question. Treated as literal, see my remarks about the inheritance of convention earlier in this post.
I was just going by what he said, which was one door had an encounter and one door didn't, but the encounter would shift if the players picked the door with no encounter behind it. It is just color, I suppose it doesn't matter. I would need to see what he meant. But since he described it as an encounter, I think it is a safe bet this is a meaningful thing he is thrusting on the players. Certainly there could be types of games where that isn't the case. But assuming it is an encounter as the term generally means in these games (and I had no reason to think he was using it in some out of the box way), then I don't see how it isn't railroading to force the encounter even when the players choose the right path to avoid the encounter but the GM insists the encounter still takes place. That is like an adventure where whether you go north or south, east or west you will still encounter the same adventure hook for the haunted house. Railroading is the X that the GM has in mind is going to happen regardless of what choices the players make.