>> I hear some companies actually get work done this way..
This statement and lack of any citations with statistics makes me suspect this as an opinion, not necessarily factual. I am a engineer from Bangalore, India. I worked for a few years with companies that outsource teams to many countries across the world. I lived in Bangalore for over 20 years and I know a lot of people who are in similar line of work. Most software companies provide competitive salaries (according to wages in India based on Indian cost of living, which is lower compared to the US) along with annual leaves, sick/casual leave, maternity leaves, statutory programs like provident fund (retirement benefits in India), gratuity fund etc. Many companies (all companies I have worked with and I know people working in) provide a lot more benefits than the ones I mentioned. I worked with companies that provided facilities like on-campus full time doctors, financial support programs, gyms, swimming pools, libraries, higher education support, employee rewards programs, sports programs, transport facilities etc. I have never heard of CS engineers hired and monitored by cameras to ensure work. I would like some citation on this, and even if it occurred at some place I doubt it's a problem at such a scale that it should be termed that it usually happens.
And, about quality of work, a large portion of the outsourcing projects involve support and maintenance of an existing software/website. Many of such customers do not have software as their primary business e.g. a internal web based software for a huge construction company. Such L2/L3 support work generally tends to be repetitive and does not require highly skilled software programmers. There are lot of companies that work on the same outsourcing model which cost the customers a lot higher and produce high quality work, such companies generally attract the better skilled engineers and customers that require high quality products.
My point, outsourcing software companies in India are definitely not sweatshops. There are sweatshops in parts of India mainly in the textile industry and they most certainly do not hire CS engineers. And, there are good and bad engineers everywhere, it's not determined by where they are from or who employs them.