ضَرَبْتُ زَيْدًا: Zayd is a direct object receiving the action.
سِرْتُ وَالنَّهْرَ: the river is an accompaniment complement, not the thing walked upon by the verb.
Both may be accusative, but their semantic roles differ. These are comparative teaching examples.