Does the hydrochloric acid in the stomach kill bacteria?

Yes, that is one of the roles that the stomach acid plays. However, some bacteria, such as E.Coli are adapted for life inside a digestive tract and can survive conditions inside the stomach.