Indeed, and pragmatism should be applied, but I mean in the context of not being rushed. I don't mind my team watching YouTube/browsing the web during work if things are going well but I wouldn't accept it if it's done after submission of suboptimal code. If there's time to watch YT, there's time to improve your code (unless it's clearly too much of a refactor).