What should pilots do if they observe illegal activity onboard an aircraft?
I think a lot would depend on the type of illegal activity observed.  For example, if someone was getting injured or worse, that would mean the crew would need to take immediate and aggressive action, which would include possibly putting themselves in some danger to protect the victim, at least to a certain degree.  That said, getting the plane down safely would be higher priority for safety all the way around so protecting the victim needs to be weighed against the risk of getting injured to the point the pilot can no longer fly the plane.

In the Bieber's case, escalating the situation by trying to intervene would only create risk of the crew being injured and then unable to bring the plane down with no real upside.  Putting out a warning, then proceeding to a suitable airport immediately would seem to be the most prudent course of action.