For foreign students, the PhD program is a great way to enter the U.S. job market. In fact, I'd go as far as to say that, while American undergrads can get lucrative job offers right out of college, foreign students are left with doing a Masters/PhD first, hence partly explaining a skew towards foreign students in many Computer Science departments around the country. For those students, I'd say the PhD program is "worth it".
Disclosure: foreign PhD candidate at an American university here.
Disclosure: foreign PhD candidate at an American university here.