The figurative sense traces to Confucius in the Analects (《论语·述而》): 不义而富且贵,于我如浮云 — 'Wealth and rank gained unjustly are to me as floating clouds' (i.e., not worth pursuing).
culture
Around 2010 浮云 became a viral internet meme (一切都是浮云 'everything is just floating clouds') — a shrugging response to anything you want to dismiss as irrelevant. Still common online today.