Water travel was the easiest way to get around, when you didn't have a horse, or donkey. It's easier to go by boat than is it to walk. Rivers supplied a ready made travel route. Also, there is water...
They are located along rivers because river passages are important for trade. the trade is usually ammunition and food. so if one of those boats sinks then that side starves and the forts win.