All of that said, "are you surrounded by incompetent people?" Hmm... well... I don't know if I'd go so far as to say "incompetent", but let me put this suggestion out there (this is not a new idea, BTW). In years past, most of the people who were majoring in CS in college were people who intrinsically enjoyed computers, programming, electronics, etc. E.g., your traditional hardcore "geek" type. People like this programmed for the sheer joy of it, wore the title "hacker" proudly, and held themselves and others to a high standard of technical excellence. Today, on the other hand, a lot (no, I can't quantify this exactly) of people in CS are probably there because they heard that it's a field where you can make a lot of money, and/or because family and friends pushed them in that direction. They don't necessarily derive any intrinsic enjoyment from learning newer and better techniques, learning new technologies, or trying to "one up" their colleagues with technical excellence.
Is this true? Hard for me to say, as University was ~25 years ago for me. I only saw it the way I experienced it. But based on what I see in industry, and what I hear from others who are still in school, or who entered industry at different times, I tend to believe there is something to it.
but at the same time, I can't help but wonder how some of my peers are passing classes or getting hired.
That's one of life's great mysteries. You may have heard anecdotes like "I interviewed a guy with a documented Ph.D. in Computer Science and he couldn't code fizz-buzz" and thought to yourself "there's no way that story is true." I'm here to tell you, I've been the guy delivering that anecdote and it's absolutely true. Perhaps even more to the point, I've interviewed people who had documented 10+ years of industry experience as developers - apparently having some modicum of success along the way (they didn't get fired after all), but yet still couldn't write fizz-buzz. Which is all a long winded way of saying "What it takes to have some modest level of success as a software developer in industry may not be what some of us think". And apparently fizz-buzz isn't all that great a predictor of whether or not someone can somehow, someway, find a way to deliver code when needed. Take that for what it's worth.