To stop headphones and speakers from playing at the same time, you have to do some troubleshooting to find the cause.
However, it can get annoying if you enable the option accidentally and don’t know how to revert the settings back to normal. It is possible to play sound through your computer speakers and headphones at the same time and such a setup can be helpful in certain cases.