So it can fit into standard size airport gates and taxiways.
One reason the A380 didn't see wider adoption was it exceeded the maximum wingspan that most airports are set up for, requiring airports to build special gates and widen taxiways to accommodate it... which is expensive so very few did that.
Even the airports that did make the A380 mods found that an A380 flight couldn't be rescheduled to any available gate, as they only modified a few berths for the wider wingspan.
By folding the wingtips, the 777-X gets the efficiency of a longer wing and wingtips, but doesn't require a wider than normal gate space and taxiway. It can use any airport that can handle commercial traffic, without requiring expensive changes to the airport.