Seemingly randomly it will cut volume to 50% to protect hearing and you can't turn up the volume until you agree to a notification warning you about the potential dangers of high-volume listening.
I use this in my car. I need the volume max -1 click. Plugging in my phone and then wondering where the music is is infuriating. I don't want to have to pull over out of traffic just to unlock my phone so I can agree to a notification and then turn up the volume again. This wouldn't be a problem if it only asked me once, but it tends to "forget" at random times, usually when I'm in a rush and don't want to fuck with my phone.
Although Google is getting on my nerves lately so I've been thinking of switching anyway.
This should be a disclaimer when buying the phone then.
The user can choose to override the limit so that the sound level can be increased up to maximum 100dB. If the user overrides the limit, warnings about the risks must be repeated every 20 hours of listening time. "
via http://www.bbc.com/news/health-21294537
The "repeated every 20 hours" would explain why OP was seeing the warning seemingly randomly.
This is why after a T-Mobile G2, a Nexus One, a Galaxy Nexus, a Nexus 4, and a Nexus 5 I finally moved to an iPhone 5s. I refuse to spend any more of my life dealing with a terrible product.
So this leaves my thinking I will not get a Nexus as my next phone. I would rather get an iPhone or a HTC/Samsung. I won't do the same mistake for the third time. I love nexus and his potential but Google doesn't care about their costumers.
But in the past few weeks it's become readily apparent that Android 5.0 is beta software. It just has too many major issues like the one in OP. For me, the most major issue is the memory leak that causes the entire home screen to be knocked out of memory. Usually a few times a week the leak is so bad that the currently running app will be closed down while it's in the foreground!