The Chief even if they took a while to get his rank/rating correct shows a good idea of what a NCO does.
As the old joke goes, a Lt. is ordered by a commander to have a flagged raised by 8 am, he turns to his NCO and says "I need the flag raised by 8 am" and the NCO make sure it gets done.
also officers, mostly Jr. Officers (like a ensign or a Lt.) would be trained to listen to his NCO's, who will have years of experience in actually doing something, while the officers have years of schooling at the academy, but less time doing stuff.
Yes, a Jr officer can order O'Brian to do something, but a wise officer will concider what he has to say before giving out a order. Good examples of this is TNG Disaster where the NCO gives ideas to the officer, and in DS9 in Hippocratic Oath, where the NCO disobeys a order from a Lt. and if the officer wanted to, could put him to court martial.