Pious actions don't have "automatic" results. When you switch on a lamp, provided the lamp is in working order, it will turn on, regardless of whether you believe it will or not, and regardless of the purpose for which you switched it on. Magic works the same way, except that it attempts to manipulate supernatural rather than natural forces, e.g. you use such and such a talisman and utter such and such a spell to get "results". But with both magic and technology, there's the idea that there are laws that can be manipulated for our own use, simply by using the correct method.
When you pray, or use holy oil or holy water, or venerate an icon, in order to accomplish something like healing, we don't believe that the healing will come automatically, since the effectiveness also depends on the faith and intention of the supplicant. Orthodoxy is not magic, any more than it is science.