Why? Some prof worked hard to create the starter code for many assignments so the student could focus on a few key parts. After the student completes the few key parts of the assignment it is obvious it is a derivative work of the professor.
Also posting the solution online would obviously make it difficult to use for the next year and I don't think it is productive to make a professor remake an assignment every year when the could be focusing on refining lecture content.
At the risk of sounding difficult, all work is derivative and I think that's a beautiful thing, not a thing meant to be haggled over and fussed about.
But I do get the point of your second paragraph. Ideally students go to class for the sake of learning, so it doesn't make sense to blatantly cheat, but such is not often the case IRL.
It'd be great if the prof made the starter code available on github and the student's code was committed to a fork. It'd be quite easy to tell then who's work is whom's.
Not really. You write pacman as the lecturer tells you, the templates and direction (s)he gave you are not yours.
After two weeks sweat, take what you have learnt and write a game using pygame, or a browser based seduction game using anonymous twitter accounts and pinterest images. Anything really.
That's yours, the skills you have learnt are yours. Thank your lecturer publicly when you IPO