1. You cannot "get rid" of A trap.
2. That was a poor choice for a trap'
3. Given the way the piping is installed even a proper trap will hang down at least the same distance.
4. In other words, at "some" time the piping might have been installed to hide the trap, it does not seem possible now.