The trap could have had some water in it and when you removed it, some of that could have gone down the drain and wetted things. Also, it's not uncommon for there to be some soap scum there. Condensation is also possible in the pipes, especially as you go up and get closer to the exit towards the roof and things cool off. All the hot, moist air from draining a tub, sink, washing machine, etc. goes somewhere and some of it will condense. Most does down the drain, but some could accumulate there and keep the soap scum and hair deposits damp.
That line should be sloped from the outlet of the trap to the vertical drain line...IOW, it should slope down all the way from the outlet of the trap.