Fundamentally, it's to do with speed. Essentially the faster the rocket comes down, the bigger any errors in it's navigation of the descent are magnified. Having a movable platform to land on means the landing pad can move to compensate for any extra error in the landing trajectory (and having it at sea you're not accidentally going to land on an orphanage, say), which means the space-X rockets can come down quicker, which means they need less fuel to slow them as they come down. So they're cheaper to fly.
I'm not sure what economies of scale are required for the cost saving to balance out the cost of developing a 'drone barge' but I assume someone's done the maths.
Jonathan