> So if copying a useful piece of code from Stack Overflow has always been acceptable
This has not "always been acceptable"; copy-pasta was a pejorative not that long ago, and people have been fired for simply copying code from SO and using it without understanding it.