HONG KONG—In the rough-and-tumble world of global currencies, where exchange rates can swing by double-digit percentages in days, the yuan’s 3% fall against the U.S. dollar marked a minor change. But it is proving cataclysmic for investors who watched the yuan climb for a decade and anchored bets around the notion it would hold steady.