Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once

I was looking at the Spotify desktop app and noticed they use two buttons for displaying an artists albums in either a Grid layout or a List layout

See below:

enter image description here

If only one layout can be selected at once why would you use two separate buttons over using just 1 button that alternates between layouts?

This is for the desktop application but in the interest of unifying experience between both desktop and mobile would it not be better to use 1 button?