“Then Rachel said, “God has vindicated me. He has responded to my prayer and given me a son.” That is why she named him Dan.”
Genesis 30:6 NET
Was it an answer to her prayer or was it merely her own arranging of things?
None the less, God took this child, Dan, into his people, Israel, as one of the foundational 12 tribes.
God works through our actions, even misguided ones.
The use of mandrakes and white sticks in Gen. 30 also indicates how superstitious and inclined to use magic, these people were. Yet they only succeeded because of God (Gen. 30:22; 31:9).
God works through us sometimes despite what we (wrongly) believe and how we (sinfully) behave. Such is His mercy.
It’s humbling to remember that such superstition and sin was involved in the founding of Israel as the twelve tribes of the Lord.