The term "ounce" is used two weighs (pun definitely intended ! ...)
A "FLUID ounce", abbreviated fl. oz., is a measure of VOLUME, NOT weight. A quart contains 32 FLUID ounces.
For measuring WEIGHT, the term "ounce" means one-sixteenth of a pound.
Using more accurate terminology, the question would be "How come 10 FLUID OUNCES of water weigh more than 10 FLUID OUNCES of air?" (And I just realize the meme should say "ounces of water weigh more", not "weighs more".)