I see that in some US universities, F-1 PhD students are required to have completed their coursework in order to be eligible for Full-time, out-of-vacation pre-completion F1 Optional Practical Training (OPT):
Ph.D. students who have completed their coursework (except for thesis) are eligible for full-time employment during the academic term.
MIT:
Students may apply for pre-completion OPT after completion of all course requirements but before completion of dissertation/thesis.
Is that a legal requirement, or do those Universities simply add more requirements on top of US immigration rules?