In my experience, listening to music engages the creative part of your brain and severely limits what you can do, but this is not readily apparent. If I listen to music, I can spend an hour CODING YEAH! and be all smug and satisfied, until I turn the music off and discover that everything I've coded is unnecessary and there is an easier way to achieve the same goal. I just didn't see it, because the creative part of…
But also, this can create waste, in that people write the Best Code Ever in their flow state (while listening music or not), but... it wasn't necessary in the first place and the time spent was a waste. This can waste anything from an hour to six months of work (honestly, I had a "CTO" once who led a team of three dozen people or so who actually went into his batcave at home for six months to write a C# framework of sorts that the whole company should use. He then quit and became self-employed so the company had to re-hire him to make sense of the framework he wrote. I'm sure he enjoyed it very much though.)