Why is there Sound only on headphones not on built in speakers?

Many amplifiers automatically disconnect the speakers when a headphone plug is inserted, unplug the headphones and the speakers should come back on.