No, they come in through all the gaps and cracks in the building frame. They also come when you have a window open for ventilation or through ventilation grills.
They are not swimming against the sewage and coming up through the plug hole.
The concept of a spider navigating a gravity driven sewer system is not realistic. The water flows downhill and the spider that could swim against the water current would be all legs (and our overloard). Water surface tension would mean any spider would have difficulty getting out of the water.
All plumbing systems have a vent stack through the roof so ...
The size and slope of sewer plumbing has been optimized for gravity flow, meaning top part of pipe shall stays dry.
When the vent pipe is not helping to break the back stream vacuum, the flow may stagnate and either leave deposits clogging the sewer pipe or backing up.
The photos are of exhaust fans. They may be exhausting restrooms, or could be drawing from other spaces, such as janitor closets, storerooms, etc. The exhaust from these fans may have excessive moisture and/or odors (restrooms), or could contain dilute cleaning chemical fumes (janitor closets).
They are not venting the sanitary waste piping. Plumbing ...
Modern waste vents are usually bare plastic pipes extending a short distance up through the roof, with no cap. Compare the vents in this image:
Judging by the apparent age of the neighborhood, the waste vent on the left is probably nothing more than a stub of ABS pipe. PVC (white) is also sometimes used. Older homes can have metal (copper, cast iron) or ...