A guy found a magic lamp and a Genie popped out and offered him infinite wisdom or infinite wealth. He asks for wisdom, the genie grants it and disappears in a puff of smoke. As the smoke clears the guys says "aw crap, I should have took the money"
Even for a religious person, being smart within their company is usually preferred. Priests and the like take great pride in their knowledge of faith and understanding of wisdom. They may take a vow of servitude and condemn themselves to poverty, but they do so with the apparent knowledge they will be rewarded for their sacrifice. That is playing the long game, which takes smarts. "Understanding God's love" and the required knowledge to be a part of a faith, you know?
People prefer to be smart over poor, when those are the only two options
That makes sense, because then you are smart, and with hard work and dedication, you can become poor as well. But if you choose poverty, there's no amount of hard work and dedication that will increase your intelligence.