How US government regulations encourage diploma mills:
I taught some online graduate courses, aimed mostly at overseas military officers, at Troy when I was teaching full time at their main campus. Trying to treat it as if it were a legitimate graduate class was a constant source of frustration. Students simply didn't have the time to do the reading and research -- they were, after all, on active duty in a military with a high operations tempo. But they'd been led to believe that the courses would be easy -- there wouldn't be much work and they could do it at their leisure. The school got a lot of money, paid its faculty quite generously, and the students got the credentials they wanted. Those of us who resisted the degree mill model were messing up that model. (I'm reliably informed that the rigor has picked up, although not to the level one would expect in a traditional on campus graduate program even at Troy.)
But the military is as much at fault here as the degree mills. They quite literally treat college education as a check in a box. A master's degree from Harvard or one from Walden both get officers over the "must have master's degree" hurdle for promotion to lieutenant colonel. And, since few officers are given the time to attend classes at a real school, the incentive to get a dubious degree in the little spare time available is powerful. The same is true, to a somewhat lesser extent, in the federal civil service and for teachers in many school systems across the country: It's the degree that matters, not the learning.
The obvious solution is to start allotting time for people to go to school, if getting an education is really important. The less obvious solution is to quit rewarding the attainment of educational credentials if, as it would seem, a bogus degree is as valid as a real one. To the extent that the skills imparted by higher education are valuable to an employer, they should be apparent in actual job performance. So just reward people who do their jobs well and don't worry about what degrees they have.
I get the impression that the primary market for diploma mill degrees is in various branches of the government. The civil service system, the army, and various local departments like teachers, all automatically reward you with higher pay if you get a degree. Since they don't distinguish between the caliber of the schools, the obvious solution is to find the easiest course you can. Undoubtedly this happens in private organizations too, but since the purpose of a degree in the private sector is signalling rather than box-checking, there is some incentive for gravitating towards higher-quality degrees.
The obvious thing to do is either end the box checking entirely, or set the quality bar much higher. The problem is, realistically many people (like active duty military) do not have time to get a real degree. And the people who already have bogus degrees from diploma mills are senior, and therefore, have some power with which to block such an initiative.