The gain is that the author has at edit time full control over where the link points to. With runtime lookup a link might change because a certain term was added to a certain namespace.
-- Jan Hidders
Well, that's not a bug but a feature! The term will not be added to a certain namespace if there isn't already some disrepancy (and if the author means the other subject he will surely link to it explicitly, like [[Root (Botanics)]]) By doing the linking in runtime we could make sure that all links point at their most updated targets, which is an advantage. This is similar to the reason why we use redirects.
As to runtime performance concerns, I'm sure that caching and/or an optimised parser could do wonders in the Wikipedia case. Wiki markup is _very light_.
Sincerely yours, Uri Yanover