Without dams and locks the Mississippi River would be un-navigable to ships and barges and the states along the river would be continually flooded and their boundaries changed by the meandering river. Locks and dams are vital to travel and commerce on the Mississippi.
There are 28 locks between St. Paul and St. Louis; there are none below St. Louis. The Mississippi River falls 450-feet between those two cities. Most locks are really shallow, under eleven feet. The largest/deepest lock is at Keokuk, Iowa and is 38-feet deep. (The Mississippi is not a very deep river.)
The top photo (from Google) shows a dam and lock. As we approached a lock during the night (and this was often the case above St.Louis), the area was flooded with light for navigating into these narrow channels. This maneuver takes knowledge and skill. The ship enters; the gates behind the ship close; the area fills with river water and when the ship is raised or lowered to the desired level, the front gate is open and the ship proceeds. Not just ships but these HUGE barges too. All us passengers stood on deck (during the day) and watched; it was fascinating.
The lower photo shows how close we were to the lock walls….that’s my hand reaching out. Illegally, as I found out later.