If the liquid soap remains unsealed then yes the bacteria could grow in liquid soap.
But as long as you keep the liquid soap sealed when not using it then the bacteria is unable to get into the bottle of liquid soap.
Or if you have those liquid soap bottles with dispensers on them then they do remain sealed so bacteria won't be able to grow in it.
Bars of soap are different though as bacteria can and does sometimes grow on bars of soap.
Liquid soap is much better at killing germs and preventing spread of germs when washing your hands but if you do use bar of soap make sure to rinse off any dirt or grime from the bar of soap before someone uses it.
For baths or showers have more than one bar of soap for people in your family to use so that germs do not spread.