In Belgium, PhD are paid salaries that are competitive with entry-level programming positions (though under what you can get if you are a little bit discriminate), and that's for all subject matters. Most of these positions are state-funded (directly through tax-exempt scholarships, or indirectly via TA contract with the state-subsidized universities).
I feel like a big reason US universities can get away with this is that they draw a lot of international students who are happy to accept lower wages for a chance to live and work in the US.