I agree with you, it is not ethical to do irrelevant things when you are at office because you get paid for doing office's tasks not other tasks, try to do other tasks at home.Every individual could have his different view but in my view it's not good to do online work while you are in office, because you are taking salaries from there so you must justify it furthermore if someone from bosses will see they'll get negative impact of it.