Lollipop volume button action has been revisited and altered moving forward with Marshmallow OS version.
In Marshmallow, the volume button functions and sound settings were revamped.
When you press the volume button, you’ll be prompted with the notification volume adjustment.
Touch the down arrow, and you’ll see additional adjustment to media and alarm volume.
If there’s media playing while you press the volume key, it’ll be adjusting the media volume
instead of the notification volume.