The Mefaresh explains that there are other examples where we find that the law is stricter with an idolater than it is with respect of a Jew. The Mishna in Bava Kamma teaches us that if the ox of idolater gores an animal belonging to a Jew, the idolater is liable to pay full damages, even if the ox gored for the first time. A Jew, however, whose ox gores for the first time, will only be liable to pay half-damages.
Tosfos suggests the following: A Jewish adult is subject to the prohibition against desecrating his word. Accordingly, we expound that any Jew who is not included in this prohibition cannot pronounce a vow. A minor, who is not subject to this commandment, cannot therefore utter a vow, which would be Biblically valid. An idolater, however, who is not included in this prohibition, cannot be excluded from pronouncing a vow based on this, and therefore, even a minor’s vow would be Biblically binding.
It is evident from Tosfos that the prohibition against desecrating his word is not applicable to an idolater. The Mishna L’melech cites proofs that an idolater is obligated to keep his word based upon the prohibition against desecrating his word.
The Ohr Sameach answers this question by citing the Chasam Sofer, who says that any idolater, even a minor is obligated to observe their commandments. This explains why with respect to idolaters, an informed minor, who has not quite reached manhood, can pronounce a vow and it will be Biblically valid, whereas a Jewish minor cannot. By an idolater, there is no distinction whatsoever between a minor and an adult. Proof to this is from the Rosh, who states that the guidelines for a minor to reach adulthood are learned from an oral tradition that was transmitted to Moshe at Sinai with respect to all measurements. These laws were given to the Jewish people; not for the idolaters.