The 2 exchanges are unrelated though... This study is discussing how children are effected in this world by religious influence (although it seems well put together, I seem to have many questions as to how and what was being tested and IF it was actually testing anything of value).
The other subject is what is better for the child in eternity. Something the non-theist will never agree with the theist on is that there is an eternity goal/possible punishment. To analyze the one mentioned second, we must make a distinct given. That in the Abrahamic faiths (a slightly less emphasis on Judaism) there are 2 options for your eternal soul (and/or body). 1 is a great reward in which noone will experience hardship or sorrow, and all their needs and wants will be fulfilled. The other is a place of perpetual agony and despair, of which noone will enjoy and there is no escape. To be sent to the later would be a horrible thing. The statement being referenced is that if the child were to die it is better than growing up in a godless home (metaphorically speaking and not literally that there is no God there since there is God in all things). That said, if the child reached the favorable eternity, and avoided the undesirable one, then God was merciful, even though this life was cut short (because this life is not the eternal reward... as Buddha said Life is suffering... to which I summarize as meaning this life is a test and is not the desirable eternity). By cutting his life short he blessed the child with an easier test. And didn't make him unable to reach that paradise. On the other hand the parents are given another reminder that this life isn't bliss and they should seek the eternal, whether they ever realize it or not...