Why purva mimansa school did not believe in existence of vedic gods but were strict believers of Vedas?
Technically speaking Purava Mimasma was not an nastika (atheistic) system as per definition of nastika in our scriptures. Only those which didn't accept the authority of the Vedas are called as nastika irrespective of whether they believe in afterlife, God, etc. But yes, like the general meaning of atheism, Mimamsa School didn't believe in the existence of any creator God or the gods mentioned in the Vedas but accepted the authority of it.
Now the reason for accepting the Vedas is that Mimasa School believed in the system of Karma to fulfill man's desires. And what actions (rituals) to do and not to do, for what purposes have been ordered in the Vedas. As per Mimasa School, carrying out these orders or injunctions is dharma (Mim. Su. 1.1.2) by following which properly man can fulfil his desires and ascend to higher existences like heaven.
But now the question arises, why they accepted Vedas as authoritative to order what to do and what not to do, why not any other text or book? And the reason is, they accepted Vedas a apauruseya (not the creation of any man). Because even if the disciple succession is intact, no one remembers who first authored the Vedas. And even if pauruseya means Isvara narrated the Vedas to someone, then it will mean Isvara just recited it as any guru does, but the Vedas were present even before the recitation of Iswara. And also by some other arguments they defend that Vedas are apuruseya.
Ok, now if they accept the Vedas, then why don't they accept the existence of the gods mentioned in them? It's because as per them the gods have no separate independent existence other than the mantras. That is, if someone has an independent existence then he can do as he likes irrespective of other factors, but the gods in the Vedas are bound to show grace and give the desired result due to the performance of actions mentioned in the Vedas. So it's just like cause and effect of a mechanical system. Hence, the effect produced by chanting of the mantras is personified as a god or the power of the god, but other than the mantra they have no independent existence.
To test the validity of something proofs like direct perception, inference, Logic, etc. are employed. And Mimasa School accepted 5-6 such proofs by which they hold their views and the words of the Vedas are a proof itself (swatah praman) by them.
Purva Mimamsa was a school of philosophy founded by the sage Jaimini whose central dogma was that the Vedas were Apaurusheya or authorless. Other schools also believed that the Vedas were Apaurusheya in the sense that they had no human author, but Purva Mimamsa went one step further in saying that they had no connection to any divine source either: they were just eternal truths that that could be heard by sages when they were in a state of Tapasya (deep meditation). The followers of Purva Mimamsa thought that the law of Karma was like a law of nature, unconnected to any divine or supernatural agency, and that if you performed Yagnas in line with the eternal truths of the Vedas, you would be automatically rewarded due to the Law of Karma. They viewed these rewards as the only purpose of Yagnas; they didn't think that they were making offerings to any gods. Here is how this book describes their philosophy:
The mantras of the Vedas, therefore, are not words coined by humans.... The Vedas, as the collection of mantras, are not about everyday things. Rather, they give us negative and positive commands concerning ethical action in life that represent the eternal principles of rita for ourselves and the universe around us.... Only the meaning content of the Vedic mantras can teach us the required continuous ethical action and enjoyment of its fruits that are the end goal of life.
For the Mimamsathe ultimate reality is nothing other than the eternal words of the Vedas. They did not accept the existence of a single supreme creator god, who might have composed the Veda. According to the Mimamsa, the gods named in the Vedas have no separate existence apart from the mantras that speaker their name. The power of the gods, then, is nothing other than the power of the mantras that name them.
Note that not all followers of Purva Mimamsa were atheists. Some believed that the gods existed, but they were just functionaries who were bound to follow the law of Karma, rather than having an independent power to choose to reward or punish people. Others believed that when the Vedas spoke of the gods doing things in response to people performing Yagnas, that was really just a metaphor for the power of the mantras delivering rewards to people. So the first group would say that Indra was forced to make rain come for those who did the appropriate Yagna, whereas the second group believed that rain would just come of its own accord for those who did the appropriate Yagna.
Krishna (perhaps insincerely) articulates the beliefs of the first group to the people of Vrindavana when he convinces them to stop worshiping Indra and worship Govardhana Giri instead, as described in the Srimad Bhagavatam:
It is by the force of karma that a living entity takes birth, and it is by karma alone that he meets his destruction. His happiness, distress, fear and sense of security all arise as the effects of karma. Even if there is some supreme controller who awards all others the results of their activities, He must also depend upon a performer’s engaging in activity. After all, there is no question of being the bestower of fruitive results unless fruitive activities have actually been performed. Living beings in this world are forced to experience the consequences of their own particular previous work. Since Lord Indra cannot in any way change the destiny of human beings, which is born of their own nature, why should people worship him? Every individual is under the control of his own conditioned nature, and thus he must follow that nature. This entire universe, with all its demigods, demons and human beings, is based on the conditioned nature of the living entities. Because it is karma that causes the conditioned living entity to accept and then give up different high- and low-grade material bodies, this karma is his enemy, friend and neutral witness, his spiritual master and controlling lord. Therefore one should seriously worship work itself. A person should remain in the position corresponding to his nature and should perform his own duty. Indeed, that by which we may live nicely is really our worshipable deity.
Note also Purva Mimamsa was nothing like the materialist forms of atheism we have today. It accepted the existence of the soul, the afterlife, Karma, reincarnation, Dharma, etc. It just wasn't committed to the existence of gods, although it allowed for the possibility and some of its adherents believed in them.
If you want a better understanding of how people adopted such a strange set of beliefs, you can read Jaimini's Mimamsa Sutras, the foundational text of the Purva Mimamsa school, here.
EDIT: This excerpt from Shabara's commentary on the Mimamsa Sutras should clarify the Purva Mimamsa's school's view of the gods:
There is one opinion that by the term 'deity' we understand those beings, Ani and the rest, who are described in Itihasas and Puranas as living in heaven.... The other opinion is that "by the term 'devata' ('Deity') are meant just those to whom the name 'Deity' has been applied in the Mantra and Brahmana texts such as, - 'Agni is the Deity' - 'Vata is the Deity' - 'Surya is the Deity' - 'Chandrama is the Deity'"... [Both these opinions are rejected for various reasons.] For these reasons we conclude that Deities are those who are Sukta-bhak (to whom Hymns are addressed) and Havir-bhak (Recipients of offerings).... [T]hat 'recipient of offerings' should be the 'Deity' for whose sake the offering is made. Similarly with 'Sukta-bhak'.... [T]he character of 'Deity' becomes applicable to all those beings that are spoken of as those to whom anything is offered - be they corporeal or incorporeal, sentient or insentient[.]... [T]hat being becomes the 'Deity' of an offering, by whose name the Sacrificer makes the determination 'I shall present the offering to so and so'.
[I]t is not in its material form that the Deity helps the accomplishment of the sacrifice - it does so in its verbal form; just as the Adhvaryu helps it with his hands, the Deity helps it with the name. Just as when ... though the action bears directly upon his hands, yet it is the Hotar priest himself that is regarded as helping the sacrifice - in the same manner, even though help is rendered by the Deity through the name connected with itself, yet it is the Deity itself that is regarded as helping the sacrifice.... [T]he word is not pronounced for the purpose of bringing about the notion of the thing denoted[.]... This is what has been explained by the Vrittikara - 'The notion of the thing denoted is not preceded by the word; hence the existence of the thing has been established (as apart from the word).' ... Says the Opponent - "In that case it is the word that becomes the Deity." Answer - This is an idea that it is not for us to refute; because such an idea, if expressed, does not militate against our view; on the contrary it lends all the more strength to the view [that different names of the same god should not be substituted for one another].
So Shabara doesn't endorse outright the view that the gods are nothing but words uttered in Yagnas, but he does not feel the need to refute that view, since he doesn't think that view would undermine any of the Purva Mimamsa school's doctrines. Other Mimamsakas, however, push back against that view more strongly; see this journal paper for details.
By the way, on a side note, Shabara quotes from the Vrittikara, i.e. the ancient commentator Upavarsha who wrote a Vritti or commentary on both the Purva Mimamsa Sutras and the Brahma Sutras as I discuss here. Upavarsha seems to be saying something like "Because the utterance of the names of gods during Yagnas does not bring about the thought of the gods, the gods exist independent of their names being uttered." That's certainly more theistic than what you typically hear about Purva Mimamsa.