Works with only one connection! It's made up of LEDs which magically light up, even without a complete circuit.
Notice no current is flowing to the common, which is connected to the other side of each LED in the display. Even if there was an internal connection to ground/common we can't see (unlike real life), some current would flow through our external connection as well.
Here's a real-world example of a 7-segment LED display, for comparison:
https://www.sparkfun.com/products/8546