The history of using soap in enemas is probably long gone, but I think its use was probably passed on from mother to daughter for at least a couple of hundred years. There may be several reasons:
The belief that a constipated kid needed "cleaning out" and a good cleaning, like washing behind the ears, involved soap and water.
Also, in the days when chamber pots or outhouses were in common use, something that worked promptly and completely was preferred.
Finally, a soapy enema often works, and the often works again, sometimes several times more, over the next few hours.
This would result in a more thorough clean out, with both hard and soft poo. If the mom can't check the results, extent of pooing is unknown.
If the results are not complete it'll be needed again within a day or two.
Plain water rinses are a relatively modern thing and are still uncommon. I've had several large volume enemas with soap, given by professional nurses on doctor's orders in hospitals, but have never been given a plain water rinse. Never. On two occasions, this has resulted in a very fast, very strong urge to poo several hours after the initial enema and evacuation. It is certain the nurses expected this, because the bedpan was left within easy reach. I sure needed it.