Human waste contains harmful germs and bacteria which cause diseases on contact. So must not be dumped. After rains, they spread/ travel to road/homes and cause diseases. It is unhygienic.
For IR, the acidic urine and the human waste dumped accelerates corrosion in the rail fastenings and weakens the track. It is difficult for maintenance personnels to maintain/ repair such "dirty fasteners" of IR tracks.