CD4017 with multiple LEDs
You left the leds floating. An unconnected pin can float between voltages and may be able to conduct to ground, completing the circuit. Or you connected them to ground via your skin or the table or moisture,  etc. This is why you should never leave something floating, connect it to a voltage source directly or with an appropriate load resistance.