The difficulty comes when you use your own personal ability to understand reality as the measure of what is possible. Consider an illusionist. Their job is to make you believe in magic. But they are fakes. Even knowing how it is done, the evidence of your senses is that what you see is "real."
How long is a million years? It defies imagination. Now consider hundreds of millions, billions of years. There is enough time for all sorts of things to happen. Consider the lottery - the chances of any one player winning the lottery are astronomical - but on a regular basis, someone wins big money. Every big winner defies impossible odds - and wins. Think about the implication of that. It doesn't mean that it makes sense for YOU to play the lottery - but improbably unlikely events happen all the time.
So what are the chances that you could get a gland to reduce surface tension to develop by chance? First, the aim was not a gland to reduce surface tension - it just happened. By chance, something series of mutations, or genetic drift gave some members of this population the ability to walk on water, and it made them better at surviving then the other members of the population, and over a long period of time, this adaptation became widespread in the population- because more of the population with the adaptation survived to reproduce than those without the adaptation.
Second, if this adaptation never came along, the birds would not walk on water. This is not an example of teleology, but of diversity. Birds survive without walking on water, the result of a lucky fluke is that these birds developed the ability to walk on water. If you ask the question, "how could blind chance have designed this feature" it seems unlikely - if you ask, "could a series of lucky flukes have resulted in this adaptation?" the answer, given millions of years, is, "why not?"