On Shabbos a katan (child) gets the din of "choleh shain bo sacana" (a sick person who is not in risk of loosing their life) in regards to their "needs". See OC Siman 276 And Siman 328. And for a "choleh shaino bo sacana" one is allowed to ask a goy to do even a malacha d'oraisa (work that is forbidden min HaTorah.) However we find in Hilchos Yom Tov Siman 511 Sif 2 that one may not ask a goy to heat up water for them on Yom Tov for the purpose of giving a katan a bath (rechitza)?
How do we understand this in light of the fact that the we know the needs of a katan give them a din of a "choleh shain bo sacana" that we would then be allowed to ask a goy to do an issur d'oraisa. Is this a contradiction? Is Yom Tov different? Is this case of "rechitza" on Yom Tov different? Why?