The river as a natural boundary is more efficient than traditional fencing is a net advantage because you don't have to repair it. The costs are therefore lower. A fence can be easily broken if people want to get over it. A river, if it is wide, is harder to get over.