I feel for Jacob. He is caught in the middle between two competing women who are using him solely (so it seems) to get them pregnant. Leah feels unloved and she is hoping to cultivate love in Jacob by bearing him children. Rachel feels her position as the loved wife is threatened because she can’t give Jacob as many children as Leah.
The Mandrake plants were supposed to induce fertility, that’s why Rachel makes the deal for them. But they do her no good. Leah sells them to her for a night with Jacob. She gets pregnant. Jacob returns to Rachel who has benefitted from the Mandrakes and remains barren. God never intended sex or children be used this way. You cannot exactly be proud of these two women.
Jacob himself resorts to folk magic to get the monochrome flocks to produce a less desirable, but more profitable, sort for himself. But it’s not the magic that works. It is God (39:9-12).
Jacob is doing the best he knows how with a culture that opposes him at every turn. I doubt Israel, reading this story for the first time, would take pride in these goings on. But with them they are reminded that as God’s people deal with hostile cultures sometimes in unacceptable ways, God Himself is working for the benefit of His people. Jacob left home with his cloak and staff. He will, with the help of God and despite all the trickery of Laban, return home a wealthy man.