Apparently it's pretty easy to create a holomatrix, even more so with only basic algorithms, such as scrubbing plasma conduits. Why did Star Trek go to the trouble of changing the EMH Mark I, instead of just creating new ones from scratch? Especially at the risk of offending one of the best (while most arrogant) holo engineer Dr. Zimmermann?
Lacking any in-universe stated explanation (besides "poor writing"), we are forced to speculate that what are being called "menial tasks" here, like scrubbing plasma conduits and dilithium mining actually do require a level of technical intelligence that is not easily achieved with conventional AI (i.e. standard computer cores). As demonstrated by the EMH (even if defective) AI based on a holo-matrix can achieve a level of creativity and problem-solving that cannot be achieved another way economically. Presumably this makes them capable of whatever is needed for plasma conduit-scrubbing and dilithium mining, rather than risking humans or other biological sentients whose use is fraught with other problems (no volunteers, and not a suitable environment).