HVAC Condensate Line P Trap
&quot;Suction&quot; is not desirable.
The main problem there is likely inadequate slope on the line coming straight out from the air handler, and/or inadequate slope on the leg to the air gap. The line across the top front appears to have adequate slope.
The actual trap is beyond the air gap, in larger diameter pipe.
In my biased opinion, the second major likely cause of problem is the use of small diameter pipes and sharp elbows rather than larger pipe and DWV sweeps for drainage plumbing. HVAC types are all about &quot;it's just clear condensate, I can run a tiny pipe&quot; and then they are shocked, just shocked when it clogs up (because that condensate comes from air, that has dust, that includes spores, and things grow...)
The open pipe stub (on top of the furnace) is probably intended to allow you to clean the vertical pipe, but given there's no access to clean the horizontal pipes, that is of limited benefit.
If you are actually asking about the open pipe on the P trap entrance, that's quite specifically to prevent suction from draining the trap and allowing sewer gas into the house. It's a &quot;standpipe&quot; forming an &quot;Air Gap&quot; and is utterly required. The P trap itself appears to be correctly installed to a drain line with a vent line extending upwards, though we can't tell if that drain line or vent line are clear and functioning. If you pour water into the standpipe it should drain away quickly, but water should remain in the lower part of the  trap when you stop pouring water in, not be sucked out into the drain.
Post-update Ugh. Well that was a sloppy hack job, as revealed by your latest/last picture - the vent line is not complete, and is venting sewer gas into your house. If there was an inspection of this work, the inspector should be fired and anything they passed should be re-inspected, and whoever did the work should be publicly shamed as well as being made to fix it to code. Or perhaps taken to court to force them to pay for someone actually competent to fix it to code. That open vent pipe inside the house on the smelly side of the trap is certainly the source of your sewer gas smell, and a code violation the size of a gigantic tortoise held up by 4 elephants...
It should either extend all the way through the roof, or connect to another vent line that goes all the way through the roof. Some might suggest a &quot;Studor&quot; vent also known as an AAV (air admittance valve.) I would not be among the &quot;some&quot; - those things fail, and your house stinks again, and you replace them, and they fail again - a vent through the roof works, reliably. Perhaps as a very temporary, quick stop-gap while you get the vent to the roof sorted.