If there are two paths, but the players don't know where they go, and aren't expected to know, then I don't think it matters whether the paths lead to the same place or not.
Which goes back to secret stakes.
Okay, I fundamentally disagree with that. I don't think that every instance of players not knowing what to find in a given direction means the stakes of the game are being kept from them. The players know they are going into a dragon's lair. They could be going to raid the hoard. They could be going to rescue somebody. They could be going to kill the dragon. That's up to them. What they may not know is what's down Path A versus Path B. If they want to spend the time, they can gather information to help enlighten them to their choice. That's not keeping stakes from them, IMO.
I said "don't know, and aren't expected to know". That second clause in my statement is doing work.
What counts as "aren't expected to know" is going to be context sensitive. An example I've discussed in the past, which I don't think counts as "aren't expected to know", is an example skill challenge set-up in the 4e DMG. In that example, there is a NPC who can't be intimidated by the PCs - they have no credible threat to bring against him, and he will just be annoyed at such an attempt. The notes to the set-up state that the players (and their PCs) can learn that the NPC will respond poorly to threats if they make a successful Insight check.
As I said, I don't think that counts as "aren't expected to know", as the information is readily available via a pretty transparent and well-understood mechanic (the Insight check) that can be readily deployed during the course of resolution at relatively low cost/risk to the players. It's the social equivalent of a hidden foe on the battlefield, who is detectable by declaring an appropriate action during combat. It's also comparable to a concealed or secret door in map-based exploration-oriented play - again, that is something learnable by the players, that it is expected they will (or at least are likely to) come to know during the course of their play.
An example that I would contrast with those in my previous two paragraphs is
how to make a magic item in 2nd ed AD&D. The player will not know the recipe from the outset, and it is not readily learnable by a fairly straightforward action declaration. The process of discovery is itself likely to take one or more session to play out, is heavily subject to GM fiat at every stage, and will mean that there is a considerable period of play which is not about making the magic item at all, but rather is about doing whatever it is that the GM has deemed necessary to enable the desired play (of making a magic item) to take place.
To relate this to the path A/path B example. If learning what is down Path A vs Path B is about (say) declaring and succeeding at some sort of knowledge or research check that is readily performable in situ or as part of the prep in a preceding downtime phase; or is easily done in situ, say by a single successful Stealth check to scout; or via a successful social interaction with a guardian at the entrance from which A and B fork; then I wouldn't say the players are not expected to know. The knowledge is easily within their grasp, without play detouring off into something wholly different.
But if learning what is down Path A vs Path B is more like the magic item creation example, and (eg) requires the players to have whole other adventures tracking down and dealing with sages, or questing to find ancient maps or journal entries, or something of that sort - action which itself will have stakes and consequences that are quite divorced from the expedition to the dragon's lair - then I think that it's fair to say that the Path A vs Path B distinction isn't that meaningful at all: if the players don't get the information, the choice of which path is essentially arbitrary and so doesn't matter; and if the players set out to obtain the information, they are committing to a different adventure, and so Path A vs Path B has paled into relative insignificance for the moment - the GM would be better off waiting to find out the consequence of that subsequent adventure, and then prepare the dragon's lair scenario down the track to fit in with whatever the fallout of the other, info-quest adventure is.
As a DM, if I'm resorting to paths leading to the same encounter, I messed up.
For the reasons I've given, I don't agree. The whole thing depends very much on further context.
There are further reasons too. Consider: it is very common for a FRPG to permit multiple pathways to get from settlement A to settlement B - eg the shorter path via the mountains and the longer path via the lowlands. Suppose the players make a choice about which path they take based on their best estimate of the arduousness of the travel (whether the game calculates that via distance and travel time, or some other means like the obstacle required for a successful travelling check) together with their chance of enduring that arduousness (eg the PCs include a ranger who is at home in the mountains, and so can reduce the default arduousness of travel there, getting the benefit of the shorter path without incurring all the risks that are concomitants of mountain travel).
So maybe the chance of a complication is 40% via the mountains, vs 50% via the lowlands. The GM might have decided that, if the travel is attended by complication, that complication will be some pursuers catching up with the PCs. It doesn't undo the meaningfulness of the players' choice to have their PCs take the mountain path, if they suffer an unlucky roll and so fail to avoid a complication, that the GM frames them into the same encounter as the GM would have used had the journey been via the lowlands and had the players also got unlucky in their roll for that journey.
On the other hand, suppose that the players have their PCs choose the mountains
because they have good reason to believe that their pursuers can't follow them there (eg the mountains are cold, and the pursuers are known not to have access to furs and blankets). Then it probably would be poor GMing to use the same encounter regardless of the players' choice of path for their journey, because that would essentially mean running roughshod over the stakes the players reasonably regard themselves as having established by their choice.
Or we could have yet another example: the players might choose the mountains over the lowlands because one of the PCs has a special ability to call on the spirits of the mountains in a crisis. In that case, it again wouldn't matter that the GM uses the same encounter either way: what matters is that, when the encounter happens, if the PCs
are in the mountains then the GM respects the subsequent decision by the player of the relevant PC to use their special ability.
These are, therefore, further illustrations of how it all depends on context. And to go back to my earlier post, if the choice between A and B is essentially colour, but nothing more - that is, it is not any sort of reasonable attempt by the players to establish the stakes of their choice - then it doesn't matter at all how the GM responds, other than by incorporating appropriate colour into their narration.