QuantityMagnitude and QuantityUnit work on Quantity objects as follows
In[3]:= QuantityMagnitude[Quantity[1.21346`, "Kilograms"/"Meters"^3]]
Out[3]= 1.21346
In[8]:= QuantityUnit[Quantity[1.21346`, "Kilograms"/"Meters"^3]]
Out[8]= ("Kilograms")/("Meters")^3
MeanDensity[100 Meter] did not evaluate to a Quantity object.
In[9]:= MeanDensity[100 Meter]
Out[9]= (1.21346 Kilogram)/Meter^3
However, giving the appropriate Quantity object to MeanDensity
In[14]:= MeanDensity[Quantity[100, "Meters"]]
Out[14]= Quantity[1.21346, ("Kilograms")/("Meters")^3]
So
In[15]:= QuantityMagnitude@MeanDensity[Quantity[100, "Meters"]]
Out[15]= 1.21346