Like Windows, allow user to manually select if Sound is routed through Headphones or Internal Speakers
Headphones and the Internal speakers are only OR option.

You can not have AND.

If your headset sometimes does not switch, check the plug for dirt stuck in it.

If it is not the hardware, reset your SMC.