Is bathroom sink pipe configuration up to code and does it have a trap?
It looks like the original installer didn't quite have the correct combination of pipes and and fudged things a bit. It's perhaps not optimal but fine to leave as is.

There is a trap which is the bit that goes down and then back up in a classical U-trap. There is water in that section to block the foul smelling air coming back up the drain.