In some sense, it's a case of "spare the rod, spoil the child": if from a very young age, students learn that plagiarizing and cheating are allowed and expected, that's what they'll do in college too.
Schools need to be responsible for enforcing academic discipline -- and to a large extent they reap what they sow. A similar, albeit lesser-in-magnitude problem exists at many schools in the US, where teachers are pressured by administration to overlook plagiarism or give students "second chances". Unsurprisingly, when you teach that cheating is profitable, people learn to cheat.
Indian students do not learn from a young age that plagiarizing and cheating are allowed and expected. Plagiarism and cheating is taken seriously at a high school level (although I'm sure there are a couple of bad apples in the bunch) and even, ironically, at the college entrance examination level where being caught cheating will cause you to be banned for several years from taking the entrance examination.
The problem with plagiarism in college is that it goes way beyond the graduate level. Most professors will have several published papers - all plagiarized from prominent journals. They will have published several books - all rehashes of standard CS literature which they will set as course textbooks to their students to make money. In this case it is a judgmental error on the part of the students. Most of them have had a fine education up till the high school level and are now adults, and they should realize the scam in front of the eyes.
There are alternatives. In my day, there was no Khan Academy. No open courses at MIT and Stanford. No Udacity.com. No iTunes University. And of course, they always have the option of graduate school in US which doesn't burn a $100k+ hole. I am not exonerating Indian schools of their responsibilities, they are certainly broken and need to be fixed as soon as possible. But at the same time, you don't need to be an outlier to beat the broken system and avoid becoming a 'coder'. I just have this strong suspicion (which of course I have no way of verifying) that all these 'coders' would be dropping out of CS programs if they were studying in an US educational institution instead of an Indian institution.
I do not think rod alone can produce the results you want.Teachers promote plagiarism because they themselves are sub par. Teachers have enough power to use rod to control student in other area of school, college life i.e. discipline, relationship between sexes,proper dressing etc.They do use rod wherever they feel confident.
Biggest problem I have seen during my schooling days is of Guru culture. Teacher is expected to know everything so they behave as such. They are never open to discussion or criticism.
So unless teachers becomes collaborator and work for the fun of it rather than respect or guru status, I have little hope.
PS: I agree with your analysis but your solution is not agreeable.
Schools need to be responsible for enforcing academic discipline -- and to a large extent they reap what they sow. A similar, albeit lesser-in-magnitude problem exists at many schools in the US, where teachers are pressured by administration to overlook plagiarism or give students "second chances". Unsurprisingly, when you teach that cheating is profitable, people learn to cheat.