This is under a bathroom sink in the house we recently purchased. It was likely done to limit the vertical space taken up by the P trap.
Is it likely to cause a problem, and/or is it a code violation (US, Oregon)?
I believe Oregon uses the UPC as the basis for their state/local code. Under the UPC S traps are illegal, and that's what you have there. S traps are illegal because they can cause the trap seal (the water that prevents the sewer gasses from entering your house) to siphon out.