How were these copper pipes attached to the T&P discharge valve likely connected?
That fitting is called a union, it was installed to allow for the T&amp;P and/or the entire water heater to be replaced without needing to cut and resolder the relief valve discharge line. 

As for the order of operations during initial installation, there really is no way to tell for sure. Assuming the discharge line exits the utility area where the heater is located then a very likely scenario is that the installer may have "roughed in" the discharge line prior to the closing of the walls with sheetrock and then simply piped to it from the T&amp;P valve once he placed the water heater in its final location. In this case it is likely that they would have begun on the right with the male adapter going into the T&amp;P valve, then measured and cut the pieces and added the fittings, working to the left until they made connection with the previously installed discharge piping. It is also possible that they piped it the opposite direction, from left to right, but personally I think its easier to go right to left in this case. The union isn't required either by code or by the fact that it is rigid copper piping, it is simply there to ease the replacement of the tank itself and the relief valve.