So for a very long time this question has been asked and asked again: How can you play audio from the built-in speakers with the headphones plugged in?
When other people's Macs are dual booted (including mine), into Linux, or Windows, it is very much possible to switch between the built in speakers and headphones. The same with the startup chime, which sounds through the speakers with the headphones plugged in.
It's not hardware [or at least, not always], so where is the cause found in software? Is it at the kernel level? Is there a private API for sound management?