Not all buttons execute actions. Sometimes they’re used to change states on an app. These are known as toggle buttons. They save space by presenting two or more options in a single control.
Toggle buttons should do three things — change states, show the current state, and reveal unselected options. If your toggle button doesn’t do all these things, it has poor usability.