I just noticed this as my phone has gone off twice in class now. Unless your phone is playing music, regardless of if you have something plugged into the headphone jack, your phone is going to use the built in speaker to alert you of notifications. I'm guessing this was intended and not a bug? :O