Senior judicial authorities said sexual activity in judicial chambers risks reducing respect for the office.