Think about it historically – the Maesters have been around for much longer than the Faith of the Seven, all the way back to the Age of Heroes, and they were a pan-Westerosi institution. So when the Andals come to Westeros and take the Vale, they find maesters there who are willing to collaborate with the new regime, who have vital and unique skills that they need to govern the lands they’ve conquered, and who aren’t competing with the septons on religious matters.
Moreover, it takes the Andals a good deal of time to get to the Reach, and by the time they do, not only have they even more experience of dealing with collaborationist maesters, they’ve kind of lost steam. Unlike the disunited Vale and Riverlands, the Lannisters and Gardeners are prepared for them and run a good game of smacking them around a bit on the battlefield then arranging marriages, lands, titles, and conversions to get the Andals assimilated into the existing power structure while getting themselves on the right side of Andal culture.
Which means when the Faith finally comes in contact with the Citadel down in the Reach, they’re both clients of the same patron. Causing trouble for the Citadel means risking the “septs, septries, and motherhouses” that the Gardener kings are building for them, and the Hightowers are forking over a lot of money for the Starry Sept and wouldn’t look kindly on them interfering with “Peremore’s pets.”
Finally, by the time that the dust is settled, both sides realize the other is useful – the Maesters are educated and teach literacy to the nobility; the Faith of the Seven is a book-based faith, so educated nobility are easier to convert to the Seven. Vice-versa, the Faith’s emphasis on the importance of learning means more lords want maesters on hand to teach their kids to read. And there’s a basic division of labor – the maesters teach secular skills and hand over the kids to their septon or septa for the equivalent of Sunday school, the septons and septas finish up the sermons and make sure the kids get back to their lessons.