There’s a difference between an ounce and a fluid ounce. It’s often believed that 1 cup of any ingredient will always weigh 8 ounces. The fact is that only 1 cup of water, or liquids with the same density as water, will weigh 8 ounces. If something other than water [or other liquid] is measured in a cup, it will equal 8 fluid ounces, but it will not necessarily weigh 8 ounces.
An ounce is a measurement of weight, which can be found by using a scale. A fluid ounce is a volume measure … the amount of space required to hold a quantity of water weighing 1 ounce; this can be measured by a graduated measuring cup.
When measuring a cup of fruits or vegetables, you would be measuring volume. For a great visual representation, see How Much is in a Cup of Fruits or Vegetables