It was mandated by the slave owner that only one breast could be used to feed the white child... If she switched up and let both black and white babies suckle from the same breast, she could be whipped. It was like then sharing the same water fountain. She wasn't a paid wet nurse who choose this profession. He was an enslaved woman who had to feed all the white babies first and her child last. So if milk went dry, they brought in another slave to feed his children.
Kaidan Chibusa Enoki: The ghostly tale of the wet nurse tree by Ito Seiu. This scroll shows the ghost holding the baby while standing under a waterfall at Juniso (where Tokyo's Shinjuku Chuo Park is now located).