Look at a sideview of how a MOSFET is made:

Note how the Source and Drain are completely the same!
For such a MOSFET (the ones that are used in ICs, not power MOSFETs, those are different) what is called the Source and what is called the Drain depends on how the current flows.
In a transmission gate we might not know yet in what direction the current flows. It could be that the current is AC and changes direction all the time. In that case you just choose the Drain and Source connections, it does not matter.
The MOSFET symbols that you use have a small arrow in the source:

Not all symbols have that and it is also not needed, as I wrote: Drain and Source are identical so the Source having an arrow doesn't mean that it is different. The arrow only indicates the direction of current.
This transmission gate circuit is the same as the ones you show but uses MOSFET symbols without the arrow at the Source:

Source.
Note how in this schematic you cannot tell what the Source or Drain is of these transistors. And it does not matter. The circuit works anyway!