All organisms with a semipermeable membrane are subject to osmotic pressure, or the effect of water moving in and out of the cell.
Bacteria have a cell membrane and a cell wall.
Most often this is a hypotonic environment, in other words, the concentration of water outside the cell is greater than the concentration of water inside the cell. This causes the net movement of more water into the cell than outside. If the bacterium did not have a cell wall, this could cause the cell to burst. Because when the outside environment around a cell is salty, then the concentration of water in the solution is less than inside the cell and water tends to leave the cell. This causes the cell to dehydrate, which eventually kills the cell.