A phone line requires only 2 wires. A cable with 4 (or more) wires can support more than one phone line.
Traditionally, red and green are used for the first line and black and yellow are used for the second line.
Most phones come wired to use the red and green line. If you wanted the phone to connecet to the other line, you'd have to change the wiring of either the phone or the jack.
The funny wiring you found where the black and yellow were attached to the red and green terminal would have allowed an unmodified phone to be plugged in there, but it would have been connected to line 2 (if I followed your description correctly).
The second line might have been used for voice, a fax machine or a dial-up computer modem.
Traditionally, red and green are used for the first line and black and yellow are used for the second line.
Most phones come wired to use the red and green line. If you wanted the phone to connecet to the other line, you'd have to change the wiring of either the phone or the jack.
The funny wiring you found where the black and yellow were attached to the red and green terminal would have allowed an unmodified phone to be plugged in there, but it would have been connected to line 2 (if I followed your description correctly).
The second line might have been used for voice, a fax machine or a dial-up computer modem.