Psychologist Paul Bloom argues that at least some of human morality is innate. In his 2014 book Just Babies he recounts the evidence that even at an early age humans manifest compassion and sympathy. (In a subsequent book entitled Against Empathy Bloom argues that empathy as commonly understood is not an asset.) The midrash seems to have anticipated the research when it describes the means by which the Egyptians rooted out any male Israelite children whose families tried to hide them and thus save them from Pharaoh’s orders to drown them in the Nile.
According to the midrash (Exodus Rabbah 1:20), Pharaoh’s henchman would enter a house in which they suspected Israelite babies might be hidden. They brought along with them an Egyptian baby. Cruelly, they would distress the Egyptian baby to the point of making it cry. The Israelite baby, hearing the crying, would then begin to cry in sympathy and reveal its hiding place whereupon the Egyptian authorities would grab the infant and send it to its death.
The point of this midrash is to explain the text that includes the puzzling statement that Moses’ mother sets her baby adrift in the Nile only after she realized “she could not hide him any longer” (Exodus 2:3). Yokheved’s pregnancy had proceeded and the observant Egyptian overlords had a rough estimate of when the baby would be due. Even with a premature birth, a time would come when the Egyptians would come round to check. It was then that she acted rather than wait for her hidden infant to be detected.
But aside from explaining the text, the midrash concomitantly describes the cruelty of the Egyptians and the sympathetic nature of Israelites. The later rabbis grasped this element of the story, proclaiming that one of the native traits of the Jewish people is a sense of compassion (Babylonian Talmud, Yevamot 79a); a trait that should generate in us considerable pride.