Normally, it can be good to have students of varying skill levels*, because the better students can help the lesser students. However, it seems that we often see stories about "Cheating in CS classes" here, which effectively discourages people from collaborating at all because it gets seen as cheating. Ideally, helping others should be rewarded, so that people who know the content would get their easy credit, while those who want to learn it would be able to do so more easily.
*Some education programs take this way too far. I've heard horror stories about how a high school geometry class had actual geometry students lumped in with special education students. Obviously that doesn't work but some overpaid idiot thought it would be a good idea anyway.