why does a measurement need both a number and a unit for its complete specification
It is important for us to specific both the magnitude and unit to successfully represent the value of a physical quantity as individually either one is meaningless and incomplete.
For example - writing 10 as the mass of a body would not help us in gauging the true matter content of the body and thus cannot be compared with other bodies. Also, just saying that the mass of a body is in grams or kilograms would also be a grossly incomplete information as it can have any magnitude from zero to infinite.
Now, the correct way of representing a quantity here would be to first state its magnitude, say 10, and then state its unit as a suffix, say kg.
Thus, the correct way of expressing the mass would be 10 kg.