In pic #2 .... that pipe contains water returning to your pool and spa. The valve allows you to set how much water goes to the pool and to the spa. In normal operation - where you aren't trying to heat and use the spa - you want most of the water flow to go to the pool (but still need some going to the spa for filtration and chlorination). The way the valve is set in the pic provides that.
Your infloor system runs off water returning to the pool. In pic #2, the tan colored dome is the water valve mechanism which diverts water to several zones in the pool. This water valve automatically changes zones while the main pump is running. Each zone probably has 3-5 cleaning heads in the pool bottom. These heads shoot water out to help move debris and dirt toward the main drains. As the heads either extend or retract they rotate slightly. This allows the water coming out to relatively cover the entire pool bottom.
I think your system is manufactured by A&A Manufacturing. While they may have updated their system over the years, it's operating principles are the same. Here's a link to their website:
A&A In-floor (QuikClean/MagnaSweep) | A and A Manufacturing | Pool Cleaning Products . That may help you better understand the system operation.
Can you take a pic closer up of all the pipes running into the main pump? Possibly looking from above. This will give a better indication of the labels on the pipes. Also, a pic from the side of the valve right behind the puck chlorinator.
I'm with triptyx - the pump on the right is most probably only for the spa jets and has nothing to do with the spillover into the pool (you don't need to run it unless you are using the spa). And, with only the main pump on, how much water is overflowing from the spa into the pool?
Thanks