We have hundreds of karmic imprints acquired from hundreds and thousands of lifetimes. In the original question, it is not entirely accurate to say that this is not in accordance with the law of cause and effect as we are indeed drawing on thousands of lifetimes of karmic imprints, within which there could be many karmic imprints and positive karmas for wealth. How Dharma protectors work is to bring forward some of our karma (in the case of our requests for certain conducive conditions) or to stall certain negative karmas that may hinder our spiritual progress. In both cases, the karmas (negative and positive) are there but the dharma protectors help us to bring forward or hold back these karmas according to what would be most conducive or beneficial to our spiritual progress at the time.
Also, as has been said, wealth is not necessary about money but about developing a mind that is able to live joyously in a way that you find wealth in many other aspects of your life - appreciating harmony, health, family, developing a generous mind that gives not just materially, but of your time, effort, skills, care, attention etc. In this way, whether you remain poverty stricken or not, you are living happily because your understanding and management of wealth becomes very different and not dependent merely on financial wealth.
In this case then, when we have achieved this state of mind, praying for money and wealth will also come with a very different motivation, that we can have what we need either to further our spiritual practice or to bring even greater benefit to others - both are connected of course.