Why are so many wires coming out from a 3-phase transformer?
Transformers are often manufactured to handle a variety of input and output conditions so they can be marketed to people with different sources and needs.
Most likely, the side with 4 wires is going to be your primary. The use of 4 wires instead of 2 allows it to be configured either in series or in parallel depending on the input voltage.
An example from the datasheet for the first power transformer that appeared on digikey can help illustrate the probable situation. In this case, 230V in series or 115V in parallel both put 115V across each half of the primary windings to produce the same desired output voltages on the secondaries.

Your secondary may have been built with similar variety of options and numbers of outputs in mind.
For testing:
Never trust markings that aren't permanent and from the manufacturer. You will have to start by doing continuity testing with all the possible connections to establish a winding pinout. Keep in mind that center tapped windings may exist, so don't stop when you find continuity on a single wire. Test for continuity to the frame as well in case you have any damaged windings. Ideally, a high voltage insulation resistance tester would be a good idea to verify the winding integrity.
Unfortunately, resistance measurements alone aren't reliable to determine the winding ratios. I highly recommend doing your winding ratio testing with an isolated low voltage signal generator. Testing unknown transformers can be extremely dangerous, so always assume you could be dealing with lethal levels of high voltage and start with the lowest test voltage that gives you a dependable measurement.