Just out of curiosity are there any professional programmers out there who don't regularly copy functions from the Internet?
The whole point of the course is to try & figure out how data structures and algorithms are implemented. It's as much about problem solving as it is coding. Sure, you could always just use std::vector in your C++ programs for vectors, but do you really understand how they work? What about binary trees and linked lists? That's the type of stuff they're teaching in these classes. Copying code & modifying it for your own purposes is fine for production, but if these students don't understand how the underlying code works, then their chances of successfully using it greatly diminishes.
I see it all the time in my courses. I emphasize to the students that they should only use methods currently covered, so they get a 0 if they go out on stackoverflow and find solutions that give them shortcuts. They fail to use critical thinking skills and gain a deep understanding of how programming works. Most of the time, their ham-fisted copy/paste code doesn't even do what the assignment requires.