They have a limited number of launch sites available to them, and the landing site is based on trajectory and fuel. Depending on the mass being launched, there will often not be enough fuel to turn around, and if you keep going, there's not much but ocean for a long way. Also, not any land will do. You need a pretty big, purpose-built space to land a rocket. With a barge, they can put that space where they need it.